Commit ace10485 authored by Brett Simmers's avatar Brett Simmers Committed by facebook-github-bot-1

Revert "Use constexpr initializers for AtomicHashArray Config"

Summary: D2284130 broke the HHVM clang build.

Reviewed By: @mxw

Differential Revision: D2303914
parent 042b0f22
...@@ -128,15 +128,9 @@ class AtomicHashArray : boost::noncopyable { ...@@ -128,15 +128,9 @@ class AtomicHashArray : boost::noncopyable {
int entryCountThreadCacheSize; int entryCountThreadCacheSize;
size_t capacity; // if positive, overrides maxLoadFactor size_t capacity; // if positive, overrides maxLoadFactor
private: constexpr Config() : emptyKey((KeyT)-1),
static constexpr KeyT kEmptyKey = (KeyT)-1; lockedKey((KeyT)-2),
static constexpr KeyT kLockedKey = (KeyT)-2; erasedKey((KeyT)-3),
static constexpr KeyT kErasedKey = (KeyT)-3;
public:
constexpr Config() : emptyKey(kEmptyKey),
lockedKey(kLockedKey),
erasedKey(kErasedKey),
maxLoadFactor(0.8), maxLoadFactor(0.8),
growthFactor(-1), growthFactor(-1),
entryCountThreadCacheSize(1000), entryCountThreadCacheSize(1000),
......
...@@ -63,7 +63,7 @@ class AtomicLinkedList { ...@@ -63,7 +63,7 @@ class AtomicLinkedList {
* Note: list must be empty on destruction. * Note: list must be empty on destruction.
*/ */
~AtomicLinkedList() { ~AtomicLinkedList() {
assert(empty()); assert(head_ == nullptr);
} }
bool empty() const { bool empty() const {
......
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