Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
saitama951 committed Jul 25, 2023
1 parent c75b5bc commit 413ec52
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Common/HashTable/TwoLevelStringHashTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,20 @@ class TwoLevelStringHashTable : private boost::noncopyable
if ((reinterpret_cast<uintptr_t>(p) & 2048) == 0)
{
memcpy(&n[0], p, 8);
if constexpr (std::endian::native == std::endian::little)
if constexpr (std::endian::native == std::endian::little)
n[0] &= -1ULL >> s;
else
n[0] &= -1ULL << s;
}
}
else
{
const char * lp = x.data + x.size - 8;
memcpy(&n[0], lp, 8);
if constexpr (std::endian::native == std::endian::little)
if constexpr (std::endian::native == std::endian::little)
n[0] >>= s;
else
n[0] <<= s;
}
}
auto res = hash(k8);
auto buck = getBucketFromHash(res);
keyHolderDiscardKey(key_holder);
Expand All @@ -139,9 +139,9 @@ class TwoLevelStringHashTable : private boost::noncopyable
memcpy(&n[1], lp, 8);
if constexpr (std::endian::native == std::endian::little)
n[1] >>= s;
else
else
n[1] <<= s;
auto res = hash(k16);
auto res = hash(k16);
auto buck = getBucketFromHash(res);
keyHolderDiscardKey(key_holder);
return func(self.impls[buck].m2, k16, res);
Expand All @@ -153,9 +153,9 @@ class TwoLevelStringHashTable : private boost::noncopyable
memcpy(&n[2], lp, 8);
if constexpr (std::endian::native == std::endian::little)
n[2] >>= s;
else
else
n[2] <<= s;
auto res = hash(k24);
auto res = hash(k24);
auto buck = getBucketFromHash(res);
keyHolderDiscardKey(key_holder);
return func(self.impls[buck].m3, k24, res);
Expand Down

0 comments on commit 413ec52

Please sign in to comment.