diff --git a/src/string_search.h b/src/string_search.h index 73e90f5873f767..6e76a5b8f413ea 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -44,7 +44,9 @@ class Vector { // Access individual vector elements - checks bounds in debug mode. T& operator[](size_t index) const { +#ifdef DEBUG CHECK(index < length_); +#endif return start_[is_forward_ ? index : (length_ - index - 1)]; }