From d3614de6178018178723ac3b8b4baaf3f1dc7fcb Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 18 Sep 2020 15:55:15 -0700 Subject: Export of internal Abseil changes -- 1829e203300191671abd4b478ca189019e6f88b1 by Abseil Team : Don't return true from Demangle() when we didn't actually produce demangled output. PiperOrigin-RevId: 332544020 -- 239b617bd8322cfda69d0dcdd3d78499ed61206d by Abseil Team : Minor documentation fix. PiperOrigin-RevId: 332517877 -- d566c156619bbdceaf6e84bd0d3aa575d5e790f8 by Gennadiy Rozental : Added missing asserts for seq.index() < capacity_ and unified their usage based on has_element(). Import of https://github.com/abseil/abseil-cpp/pull/781 PiperOrigin-RevId: 332229369 GitOrigin-RevId: 1829e203300191671abd4b478ca189019e6f88b1 Change-Id: I5bb1f713497fef54a7abaf2020be91cb32e87b93 --- absl/container/internal/raw_hash_set.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'absl/container/internal') diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h index 130da13c..ec13a2f7 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h @@ -1327,6 +1327,7 @@ class raw_hash_set { } if (ABSL_PREDICT_TRUE(g.MatchEmpty())) return end(); seq.next(); + assert(seq.index() < capacity_ && "full table!"); } } template @@ -1678,8 +1679,8 @@ class raw_hash_set { #endif return {seq.offset(mask.LowestBitSet()), seq.index()}; } - assert(seq.index() < capacity_ && "full table!"); seq.next(); + assert(seq.index() < capacity_ && "full table!"); } } @@ -1710,6 +1711,7 @@ class raw_hash_set { } if (ABSL_PREDICT_TRUE(g.MatchEmpty())) break; seq.next(); + assert(seq.index() < capacity_ && "full table!"); } return {prepare_insert(hash), true}; } -- cgit v1.2.3