summaryrefslogtreecommitdiff
path: root/klm/util/string_piece.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-02-18 18:31:23 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-02-18 18:31:23 +0100
commit12f2eab0e7dc7167af47cddf8ef88968656277da (patch)
tree28953cc5de058908056b319222afc60d1efb6660 /klm/util/string_piece.cc
parentf051e98fb35c4ce69e489ef6550840bd6cd617fd (diff)
parent95c364f2cb002241c4a62bedb1c5ef6f1e9a7f22 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'klm/util/string_piece.cc')
-rw-r--r--klm/util/string_piece.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/klm/util/string_piece.cc b/klm/util/string_piece.cc
index b422cefc..ec394b96 100644
--- a/klm/util/string_piece.cc
+++ b/klm/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_,