diff options
author | Kenneth Heafield <github@kheafield.com> | 2013-01-23 00:23:35 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2013-01-23 00:23:35 +0400 |
commit | e2fc3062315ab5039abb27c594a88fb87adfd5c8 (patch) | |
tree | 6a15ae47c533ad2a3b46fa5c0a07928c1d1bf3ff /util/string_piece.cc | |
parent | fcf75fae18c618877a6c0e7d8ebcfcaf833f5e27 (diff) |
KenLM 58da33: compiler warnings, correctly handle bare K, kill HAVE_BOOST
Diffstat (limited to 'util/string_piece.cc')
-rw-r--r-- | util/string_piece.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/string_piece.cc b/util/string_piece.cc index b422cefc9..ec394b96b 100644 --- a/util/string_piece.cc +++ b/util/string_piece.cc @@ -17,7 +17,8 @@ void StringPiece::CopyToString(std::string* target) const { } size_type StringPiece::find(const StringPiece& s, size_type pos) const { - if (length_ < 0 || pos > static_cast<size_type>(length_)) + // Not sure why length_ < 0 was here since it's std::size_t. + if (/*length_ < 0 || */pos > static_cast<size_type>(length_)) return npos; const char* result = std::search(ptr_ + pos, ptr_ + length_, |