From: Brett Simmers Date: Sat, 1 Aug 2015 20:39:19 +0000 (-0700) Subject: Revert "Use constexpr initializers for AtomicHashArray Config" X-Git-Tag: v0.53.0~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ace10485f7356cfd0b995483cdc683849eb21fd3;p=folly.git Revert "Use constexpr initializers for AtomicHashArray Config" Summary: D2284130 broke the HHVM clang build. Reviewed By: @mxw Differential Revision: D2303914 --- diff --git a/folly/AtomicHashArray.h b/folly/AtomicHashArray.h index be787695..7f12f862 100644 --- a/folly/AtomicHashArray.h +++ b/folly/AtomicHashArray.h @@ -128,15 +128,9 @@ class AtomicHashArray : boost::noncopyable { int entryCountThreadCacheSize; size_t capacity; // if positive, overrides maxLoadFactor - private: - static constexpr KeyT kEmptyKey = (KeyT)-1; - static constexpr KeyT kLockedKey = (KeyT)-2; - static constexpr KeyT kErasedKey = (KeyT)-3; - - public: - constexpr Config() : emptyKey(kEmptyKey), - lockedKey(kLockedKey), - erasedKey(kErasedKey), + constexpr Config() : emptyKey((KeyT)-1), + lockedKey((KeyT)-2), + erasedKey((KeyT)-3), maxLoadFactor(0.8), growthFactor(-1), entryCountThreadCacheSize(1000), diff --git a/folly/AtomicLinkedList.h b/folly/AtomicLinkedList.h index f24746a5..eca8de16 100644 --- a/folly/AtomicLinkedList.h +++ b/folly/AtomicLinkedList.h @@ -63,7 +63,7 @@ class AtomicLinkedList { * Note: list must be empty on destruction. */ ~AtomicLinkedList() { - assert(empty()); + assert(head_ == nullptr); } bool empty() const {