Fix warning.
This commit is contained in:
parent
47aa5b51c7
commit
f1ee808465
@ -18,7 +18,7 @@ template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = s
|
|||||||
class WaitFreeHashMap {
|
class WaitFreeHashMap {
|
||||||
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
|
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
|
||||||
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
|
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
|
||||||
static constexpr size_t DEFAULT_STORAGE_SIZE = 1 << 14;
|
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 14;
|
||||||
|
|
||||||
FlatHashMap<KeyT, ValueT, HashT, EqT> default_map_;
|
FlatHashMap<KeyT, ValueT, HashT, EqT> default_map_;
|
||||||
struct WaitFreeStorage {
|
struct WaitFreeStorage {
|
||||||
@ -43,7 +43,7 @@ class WaitFreeHashMap {
|
|||||||
void split_storage() {
|
void split_storage() {
|
||||||
CHECK(wait_free_storage_ == nullptr);
|
CHECK(wait_free_storage_ == nullptr);
|
||||||
wait_free_storage_ = make_unique<WaitFreeStorage>();
|
wait_free_storage_ = make_unique<WaitFreeStorage>();
|
||||||
auto next_hash_mult = hash_mult_ * 1000000007;
|
uint32 next_hash_mult = hash_mult_ * 1000000007;
|
||||||
for (uint32 i = 0; i < MAX_STORAGE_COUNT; i++) {
|
for (uint32 i = 0; i < MAX_STORAGE_COUNT; i++) {
|
||||||
auto &map = wait_free_storage_->maps_[i];
|
auto &map = wait_free_storage_->maps_[i];
|
||||||
map.hash_mult_ = next_hash_mult;
|
map.hash_mult_ = next_hash_mult;
|
||||||
|
@ -18,7 +18,7 @@ template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<K
|
|||||||
class WaitFreeHashSet {
|
class WaitFreeHashSet {
|
||||||
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
|
static constexpr size_t MAX_STORAGE_COUNT = 1 << 8;
|
||||||
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
|
static_assert((MAX_STORAGE_COUNT & (MAX_STORAGE_COUNT - 1)) == 0, "");
|
||||||
static constexpr size_t DEFAULT_STORAGE_SIZE = 1 << 14;
|
static constexpr uint32 DEFAULT_STORAGE_SIZE = 1 << 14;
|
||||||
|
|
||||||
FlatHashSet<KeyT, HashT, EqT> default_set_;
|
FlatHashSet<KeyT, HashT, EqT> default_set_;
|
||||||
struct WaitFreeStorage {
|
struct WaitFreeStorage {
|
||||||
@ -43,7 +43,7 @@ class WaitFreeHashSet {
|
|||||||
void split_storage() {
|
void split_storage() {
|
||||||
CHECK(wait_free_storage_ == nullptr);
|
CHECK(wait_free_storage_ == nullptr);
|
||||||
wait_free_storage_ = make_unique<WaitFreeStorage>();
|
wait_free_storage_ = make_unique<WaitFreeStorage>();
|
||||||
auto next_hash_mult = hash_mult_ * 1000000007;
|
uint32 next_hash_mult = hash_mult_ * 1000000007;
|
||||||
for (uint32 i = 0; i < MAX_STORAGE_COUNT; i++) {
|
for (uint32 i = 0; i < MAX_STORAGE_COUNT; i++) {
|
||||||
auto &set = wait_free_storage_->sets_[i];
|
auto &set = wait_free_storage_->sets_[i];
|
||||||
set.hash_mult_ = next_hash_mult;
|
set.hash_mult_ = next_hash_mult;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user