diff options
author | Evan Brown <ezb@google.com> | 2024-03-06 12:32:04 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-03-06 12:32:57 -0800 |
commit | 6f0bb2747d0a910de4a958eeeab2b9d615156382 (patch) | |
tree | bb9789cdde667349f13891788a5554632c80ed91 /absl | |
parent | 1449c9a106b090f61441ba245c781d7d2f89000c (diff) |
Add ABSL_ATTRIBUTE_UNUSED to variables used in an ABSL_ASSUME.
PiperOrigin-RevId: 613305668
Change-Id: Ifc247f48ea476745eaaf0dd41dbdab8404a6cafb
Diffstat (limited to 'absl')
-rw-r--r-- | absl/container/internal/raw_hash_set.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 0d5a5344..d4418339 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -2672,8 +2672,8 @@ class raw_hash_set { const size_t cap = common().capacity(); // Use local variables because compiler complains about using functions in // assume. - static constexpr bool kSooEnabled = SooEnabled(); - static constexpr size_t kSooCapacity = SooCapacity(); + ABSL_ATTRIBUTE_UNUSED static constexpr bool kSooEnabled = SooEnabled(); + ABSL_ATTRIBUTE_UNUSED static constexpr size_t kSooCapacity = SooCapacity(); ABSL_ASSUME(!kSooEnabled || cap >= kSooCapacity); return cap; } |