Start compiling a bit of `-Wshadow`
[folly.git] / folly / AtomicLinkedList.h
index eca8de16d9b32450cdab81876ae1c3834c6c9efe..459036ef6a91f5d0cf1b9e0aa6025f5f6c36e443 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_ATOMIC_LINKED_LIST_H_
-#define FOLLY_ATOMIC_LINKED_LIST_H_
+#pragma once
 
 #include <atomic>
 #include <cassert>
@@ -63,7 +62,7 @@ class AtomicLinkedList {
    * Note: list must be empty on destruction.
    */
   ~AtomicLinkedList() {
-    assert(head_ == nullptr);
+    assert(empty());
   }
 
   bool empty() const {
@@ -134,5 +133,3 @@ class AtomicLinkedList {
 };
 
 } // namespace folly
-
-#endif