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

Unified Diff: base/string_split.cc

Issue 8354008: Fixing some warning due to different signess of char (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Better if in dns_util.cc Created 9 years, 1 month 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 | net/base/dns_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_split.cc
diff --git a/base/string_split.cc b/base/string_split.cc
index cb9ee7aae2e637f547430774174dc65d03935bc6..cdf708ba5116dab6dfc0f6a29ad14de3c3513f5f 100644
--- a/base/string_split.cc
+++ b/base/string_split.cc
@@ -45,7 +45,10 @@ void SplitString(const string16& str,
void SplitString(const std::string& str,
char c,
std::vector<std::string>* r) {
- DCHECK(c >= 0 && c < 0x7F);
+#if CHAR_MIN < 0
+ DCHECK(c >= 0);
+#endif
+ DCHECK(c < 0x7F);
SplitStringT(str, c, true, r);
}
@@ -156,7 +159,10 @@ void SplitStringDontTrim(const std::string& str,
char c,
std::vector<std::string>* r) {
DCHECK(IsStringUTF8(str));
- DCHECK(c >= 0 && c < 0x7F);
+#if CHAR_MIN < 0
+ DCHECK(c >= 0);
+#endif
+ DCHECK(c < 0x7F);
SplitStringT(str, c, false, r);
}
« no previous file with comments | « no previous file | net/base/dns_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698