Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1698)

Unified Diff: src/vector.h

Issue 2422173003: [regexp] Work around gcc bug triggering -Werror=strict-overflow (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vector.h
diff --git a/src/vector.h b/src/vector.h
index d120dfc4ac70c36ff9cbc7340546b356f529babd..080f89e9f4c3715d007f4e6fb82ffe4699abb3ee 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -51,7 +51,8 @@ class Vector {
// Access individual vector elements - checks bounds in debug mode.
T& operator[](int index) const {
- DCHECK(0 <= index && index < length_);
+ DCHECK_LE(0, index);
+ DCHECK_LT(index, length_);
return start_[index];
}
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698