summaryrefslogtreecommitdiff
path: root/src/string_search.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_search.h')
-rw-r--r--src/string_search.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/string_search.h b/src/string_search.h
index 73e90f5873..6e76a5b8f4 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)];
}