Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: base/string_piece.cc

Issue 3089004: Mac: Some clang appeasing. (Closed)
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_popup_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_piece.cc
diff --git a/base/string_piece.cc b/base/string_piece.cc
index 082e3c26b6d5ac7e97a633a803525bdaf144b068..3ccb4f0431c52c8e068c729bf625504306aed8f2 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 {
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_popup_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698