diff options
author | Kenneth Heafield <github@kheafield.com> | 2020-02-26 02:46:33 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2020-02-26 02:46:33 +0300 |
commit | f5458d09e54ee7c00485436137328b1ba24f56e5 (patch) | |
tree | 54d86c800c985e0a434631f8afd20550e19695ef /util | |
parent | 25bb09b510085798738475fc10974a3f0c967871 (diff) |
ICU doesn't have operator[] on StringPiece
Diffstat (limited to 'util')
-rw-r--r-- | util/tokenize_piece.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/tokenize_piece.hh b/util/tokenize_piece.hh index f5ce336..7064336 100644 --- a/util/tokenize_piece.hh +++ b/util/tokenize_piece.hh @@ -162,7 +162,7 @@ inline StringPiece Trim(StringPiece str, const bool *spaces = kSpaces) { while (!str.empty() && spaces[static_cast<unsigned char>(*str.data())]) { str = StringPiece(str.data() + 1, str.size() - 1); } - while (!str.empty() && spaces[static_cast<unsigned char>(str[str.size() - 1])]) { + while (!str.empty() && spaces[static_cast<unsigned char>(str.data()[str.size() - 1])]) { str = StringPiece(str.data(), str.size() - 1); } return str; |