diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 04:27:19 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 04:27:19 +0000 |
commit | f024f7900b966402d73c9516a9b7e6fe7e98684c (patch) | |
tree | fae561da12e5cbab2df4412c35bd6b75a0a18a06 /base | |
parent | 30cb7a44b47b8ec5ef9607ef65dcd6aead29bbe9 (diff) | |
download | chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.zip chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.gz chromium_src-f024f7900b966402d73c9516a9b7e6fe7e98684c.tar.bz2 |
Mac: Some clang appeasing.
BUG=TEST=none
Review URL: http://codereview.chromium.org/3089004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/string_piece.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/string_piece.cc b/base/string_piece.cc index 082e3c2..3ccb4f0 100644 --- a/base/string_piece.cc +++ b/base/string_piece.cc @@ -54,7 +54,7 @@ size_type StringPiece::find(char c, size_type pos) const { return npos; const char* result = std::find(ptr_ + pos, ptr_ + length_, c); - return result != ptr_ + length_ ? result - ptr_ : npos; + return result != ptr_ + length_ ? static_cast<size_t>(result - ptr_) : npos; } size_type StringPiece::rfind(const StringPiece& s, size_type pos) const { @@ -66,7 +66,7 @@ size_type StringPiece::rfind(const StringPiece& s, size_type pos) const { const char* last = ptr_ + std::min(length_ - s.length_, pos) + s.length_; const char* result = std::find_end(ptr_, last, s.ptr_, s.ptr_ + s.length_); - return result != last ? result - ptr_ : npos; + return result != last ? static_cast<size_t>(result - ptr_) : npos; } size_type StringPiece::rfind(char c, size_type pos) const { |