diff options
Diffstat (limited to 'absl/container')
-rw-r--r-- | absl/container/fixed_array.h | 2 | ||||
-rw-r--r-- | absl/container/inlined_vector_test.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/absl/container/fixed_array.h b/absl/container/fixed_array.h index b92d9056..06bc8009 100644 --- a/absl/container/fixed_array.h +++ b/absl/container/fixed_array.h @@ -207,7 +207,7 @@ class FixedArray { // Overload of FixedArray::at() to return a const reference to the ith element // of the fixed array. const_reference at(size_type i) const { - if (i >= size()) { + if (ABSL_PREDICT_FALSE(i >= size())) { base_internal::ThrowStdOutOfRange("FixedArray::at failed bounds check"); } return data()[i]; diff --git a/absl/container/inlined_vector_test.cc b/absl/container/inlined_vector_test.cc index 0e39855b..26a7d5bc 100644 --- a/absl/container/inlined_vector_test.cc +++ b/absl/container/inlined_vector_test.cc @@ -651,7 +651,7 @@ TEST(IntVec, AliasingCopyAssignment) { IntVec original; Fill(&original, len); IntVec dup = original; - dup = dup; + dup = *&dup; EXPECT_EQ(dup, original); } } |