Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2013-01-23 00:23:35 +0400
committerKenneth Heafield <github@kheafield.com>2013-01-23 00:23:35 +0400
commite2fc3062315ab5039abb27c594a88fb87adfd5c8 (patch)
tree6a15ae47c533ad2a3b46fa5c0a07928c1d1bf3ff /util/string_piece.cc
parentfcf75fae18c618877a6c0e7d8ebcfcaf833f5e27 (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.cc3
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_,