diff options
author | Abseil Team <absl-team@google.com> | 2024-01-30 12:52:43 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-01-30 12:53:38 -0800 |
commit | c44dd5acd7848a175d1fb939cdb81a4cf8d4c912 (patch) | |
tree | 4f853927f1aa61dc3fd658dbba141f6d9148b1db /absl/container/internal/raw_hash_set.h | |
parent | 779a3565ac6c5b69dd1ab9183e500a27633117d5 (diff) |
Early return from destroy_slots for trivially destructible types in flat_hash_{*}.
PiperOrigin-RevId: 602813933
Change-Id: I744fe438281755a141b2fd47e54ab9c6c0fad5a3
Diffstat (limited to 'absl/container/internal/raw_hash_set.h')
-rw-r--r-- | absl/container/internal/raw_hash_set.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index ba7df607..9f16a815 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2881,6 +2881,7 @@ class raw_hash_set { } inline void destroy_slots() { + if (PolicyTraits::template destroy_is_trivial<Alloc>()) return; const size_t cap = capacity(); const ctrl_t* ctrl = control(); slot_type* slot = slot_array(); |