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

Unified Diff: base/strings/string_util.h

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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 | « base/strings/string_number_conversions.cc ('k') | base/strings/utf_string_conversion_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util.h
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 0ec94d33eaf15829d027c8f6291c4758f2e2bd0d..c3464e6b3ac3ee629ef9aca42eeb1097e7b5b50f 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -358,14 +358,14 @@ inline bool IsHexDigit(Char c) {
}
template <typename Char>
-inline Char HexDigitToInt(Char c) {
+inline char HexDigitToInt(Char c) {
DCHECK(IsHexDigit(c));
if (c >= '0' && c <= '9')
- return c - '0';
+ return static_cast<char>(c - '0');
if (c >= 'A' && c <= 'F')
- return c - 'A' + 10;
+ return static_cast<char>(c - 'A' + 10);
if (c >= 'a' && c <= 'f')
- return c - 'a' + 10;
+ return static_cast<char>(c - 'a' + 10);
return 0;
}
« no previous file with comments | « base/strings/string_number_conversions.cc ('k') | base/strings/utf_string_conversion_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698