diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-01-24 20:16:06 +0100 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-01-24 15:02:20 -0800 |
commit | 4c4af643e5042d615a60c6bbc05aee9d81b903e5 (patch) | |
tree | 3fb0a97988fe4439ae3ae06f26915d1dcf8cab92 /deps/v8/src/string-search.h | |
parent | fa9f31a4fda5a3782c652e56e394465805ebb50f (diff) | |
download | android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.gz android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.bz2 android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.zip |
deps: update V8 to 6.4.388.40
PR-URL: https://github.com/nodejs/node/pull/17489
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/string-search.h')
-rw-r--r-- | deps/v8/src/string-search.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/v8/src/string-search.h b/deps/v8/src/string-search.h index 637d000c56..aa7b847ce6 100644 --- a/deps/v8/src/string-search.h +++ b/deps/v8/src/string-search.h @@ -87,7 +87,7 @@ class StringSearch : private StringSearchBase { // Latin1 needle. return kLatin1AlphabetSize; } else { - DCHECK(sizeof(PatternChar) == 2); + DCHECK_EQ(sizeof(PatternChar), 2); // UC16 needle. return kUC16AlphabetSize; } @@ -220,7 +220,7 @@ inline int FindFirstCharacter(Vector<const PatternChar> pattern, const SubjectChar* char_pos = reinterpret_cast<const SubjectChar*>( memchr(subject.start() + pos, search_byte, (max_n - pos) * sizeof(SubjectChar))); - if (char_pos == NULL) return -1; + if (char_pos == nullptr) return -1; char_pos = AlignDown(char_pos, sizeof(SubjectChar)); pos = static_cast<int>(char_pos - subject.start()); if (subject[pos] == search_char) return pos; @@ -258,7 +258,7 @@ template <typename PatternChar, typename SubjectChar> inline bool CharCompare(const PatternChar* pattern, const SubjectChar* subject, int length) { - DCHECK(length > 0); + DCHECK_GT(length, 0); int pos = 0; do { if (pattern[pos] != subject[pos]) { @@ -277,7 +277,7 @@ int StringSearch<PatternChar, SubjectChar>::LinearSearch( Vector<const SubjectChar> subject, int index) { Vector<const PatternChar> pattern = search->pattern_; - DCHECK(pattern.length() > 1); + DCHECK_GT(pattern.length(), 1); int pattern_length = pattern.length(); int i = index; int n = subject.length() - pattern_length; |