aboutsummaryrefslogtreecommitdiff
path: root/absl/container/internal/raw_hash_set.cc
diff options
context:
space:
mode:
authorEvan Brown <ezb@google.com>2023-07-27 13:00:49 -0700
committerCopybara-Service <copybara-worker@google.com>2023-07-27 13:01:30 -0700
commitc9c0fd5185067208e1cc4227d16122571762af39 (patch)
tree2ea275968e3667ba923ebe1e9cd5efcd76e000a4 /absl/container/internal/raw_hash_set.cc
parent8f4fcc62cf9b92680bed46655653f224190bfce3 (diff)
downloadabseil-c9c0fd5185067208e1cc4227d16122571762af39.tar.gz
abseil-c9c0fd5185067208e1cc4227d16122571762af39.tar.bz2
abseil-c9c0fd5185067208e1cc4227d16122571762af39.zip
Refactor raw_hash_set deallocation to pass CommonFields instead of passing the results of a bunch of accessors of CommonFields.
Motivation: this makes it easier to refactor CommonFields to be smaller. PiperOrigin-RevId: 551616928 Change-Id: I3710443fb156537d716944584bea02f945559e99
Diffstat (limited to 'absl/container/internal/raw_hash_set.cc')
-rw-r--r--absl/container/internal/raw_hash_set.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/absl/container/internal/raw_hash_set.cc b/absl/container/internal/raw_hash_set.cc
index ef2594c9..2ff95b61 100644
--- a/absl/container/internal/raw_hash_set.cc
+++ b/absl/container/internal/raw_hash_set.cc
@@ -247,9 +247,7 @@ void ClearBackingArray(CommonFields& c, const PolicyFunctions& policy,
ResetCtrl(c, policy.slot_size);
c.infoz().RecordStorageChanged(0, c.capacity());
} else {
- void* set = &c;
- (*policy.dealloc)(set, policy, c.backing_array_start(), c.slot_array(),
- c.capacity());
+ (*policy.dealloc)(c, policy);
c.set_control(EmptyGroup());
c.set_generation_ptr(EmptyGeneration());
c.set_slots(nullptr);