Commit 46bf40d1 authored by Zhen (Growth) Li's avatar Zhen (Growth) Li Committed by facebook-github-bot-9

switch the IndexType and Allocator in AtomicUnorderedInsertMap template

Summary: Our use case need to have the IndexType Configurable, but in this diff D2583752, lint error shows
  Code from folly::detail is logically private, please avoid use outside of folly.
In order to fix this lint error, I switch the IndexType and Allocator in the AtomicUnorderedInsertMap template.

Reviewed By: nbronson

Differential Revision: D2610921

fb-gh-sync-id: ae81b41e7c8c971f26c61b8c67dabeadff379584
parent 8f29e483
......@@ -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 {
......@@ -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,
......
......@@ -94,8 +94,8 @@ using UIM =
(boost::has_trivial_destructor<Key>::value &&
boost::has_trivial_destructor<Value>::value),
Atom,
Allocator,
IndexType>;
IndexType,
Allocator>;
namespace {
template <typename T>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment