diff options
author | Darshan Sen <raisinten@gmail.com> | 2021-01-30 17:37:48 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-02-16 17:12:36 +0300 |
commit | 48ce1eb364ef29839167b97667e14d61ab4f7f2c (patch) | |
tree | 34899a9ba00be91cf136cf291b2964a7ace28a2a /src | |
parent | 4cdc5ea823458e5d4fe0b7767529785d41fcbd3e (diff) |
src: fix warning in string_search.h
Fixes: https://github.com/nodejs/node/issues/37145
PR-URL: https://github.com/nodejs/node/pull/37146
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/string_search.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_search.h b/src/string_search.h index 3d06f32058f..3648bc015ab 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -458,7 +458,7 @@ size_t StringSearch<Char>::BoyerMooreHorspoolSearch( const size_t subject_length = subject.length(); const size_t pattern_length = pattern_.length(); int* char_occurrences = bad_char_shift_table_; - int64_t badness = -pattern_length; + int64_t badness = -static_cast<int64_t>(pattern_length); // How bad we are doing without a good-suffix table. Char last_char = pattern_[pattern_length - 1]; |