Start compiling a bit of `-Wshadow`
[folly.git] / folly / AtomicUnorderedMap.h
index 4c0afb689aa30426aec8bf4f6d4b990ab8d27a28..68fc585d1f8e2b7c52d7255aa9134114d0585490 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.
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef FOLLY_ATOMICUNORDEREDMAP_H
-#define FOLLY_ATOMICUNORDEREDMAP_H
+
+#pragma once
 
 #include <atomic>
 #include <functional>
@@ -135,8 +135,8 @@ template <typename Key,
               (boost::has_trivial_destructor<Key>::value &&
                boost::has_trivial_destructor<Value>::value),
           template<typename> class Atom = std::atomic,
-          typename Allocator = folly::detail::MMapAlloc,
-          typename IndexType = uint32_t>
+          typename IndexType = uint32_t,
+          typename Allocator = folly::detail::MMapAlloc>
 
 struct AtomicUnorderedInsertMap {
 
@@ -178,7 +178,7 @@ struct AtomicUnorderedInsertMap {
     }
 
     // post-increment
-    ConstIterator operator++ (int dummy) {
+    ConstIterator operator++(int /* dummy */) {
       auto prev = *this;
       ++*this;
       return prev;
@@ -493,9 +493,8 @@ using AtomicUnorderedInsertMap64 =
                              KeyEqual,
                              SkipKeyValueDeletion,
                              Atom,
-                             Allocator,
-                             uint64_t>;
-
+                             uint64_t,
+                             Allocator>;
 
 /// MutableAtom is a tiny wrapper than gives you the option of atomically
 /// updating values inserted into an AtomicUnorderedInsertMap<K,
@@ -520,4 +519,3 @@ struct MutableData {
 
 
 }
-#endif