Commit 6f0bb274 by Evan Brown Committed by Copybara-Service

Add ABSL_ATTRIBUTE_UNUSED to variables used in an ABSL_ASSUME.

PiperOrigin-RevId: 613305668
Change-Id: Ifc247f48ea476745eaaf0dd41dbdab8404a6cafb
parent 1449c9a1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment