diff options
author | Evan Brown <ezb@google.com> | 2022-12-08 14:15:12 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-12-08 14:15:46 -0800 |
commit | 522606b7fae37836c138e83f6eec0eabb9947dc0 (patch) | |
tree | a2db21893f057137686fdf460b2e192c3677d2d5 /absl/container/internal/raw_hash_set.cc | |
parent | ec583f2df279c86a8e8ba123b8929e92d2ee00f2 (diff) | |
download | abseil-522606b7fae37836c138e83f6eec0eabb9947dc0.tar.gz abseil-522606b7fae37836c138e83f6eec0eabb9947dc0.tar.bz2 abseil-522606b7fae37836c138e83f6eec0eabb9947dc0.zip |
Fix some ClangTidy warnings in raw_hash_set code.
PiperOrigin-RevId: 493993005
Change-Id: I0705be8678022a9e08a1af9972687b7955593994
Diffstat (limited to 'absl/container/internal/raw_hash_set.cc')
-rw-r--r-- | absl/container/internal/raw_hash_set.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/absl/container/internal/raw_hash_set.cc b/absl/container/internal/raw_hash_set.cc index 1beab92f..79220836 100644 --- a/absl/container/internal/raw_hash_set.cc +++ b/absl/container/internal/raw_hash_set.cc @@ -16,6 +16,7 @@ #include <atomic> #include <cstddef> +#include <cstring> #include "absl/base/config.h" @@ -182,10 +183,10 @@ void EraseMetaOnly(CommonFields& c, ctrl_t* it, size_t slot_size) { // We count how many consecutive non empties we have to the right and to the // left of `it`. If the sum is >= kWidth then there is at least one probe // window that might have seen a full group. - bool was_never_full = - empty_before && empty_after && - static_cast<size_t>(empty_after.TrailingZeros() + - empty_before.LeadingZeros()) < Group::kWidth; + bool was_never_full = empty_before && empty_after && + static_cast<size_t>(empty_after.TrailingZeros()) + + empty_before.LeadingZeros() < + Group::kWidth; SetCtrl(c, index, was_never_full ? ctrl_t::kEmpty : ctrl_t::kDeleted, slot_size); |