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

Unified Diff: base/command_line.cc

Issue 815543002: Avoid a string copy for every CommandLine::HasSwitch query (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo line removal Created 6 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line.cc
diff --git a/base/command_line.cc b/base/command_line.cc
index fb7c81376ba4bfce5936b4298989b2144862c0fb..6125667d3ec8e66dcead5ec8147fd5879bd6ad48 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -94,13 +94,15 @@ void AppendSwitchesAndArguments(CommandLine* command_line,
}
// Lowercase switches for backwards compatiblity *on Windows*.
-std::string LowerASCIIOnWindows(const std::string& string) {
#if defined(OS_WIN)
+std::string LowerASCIIOnWindows(const std::string& string) {
return StringToLowerASCII(string);
+}
#elif defined(OS_POSIX)
+const std::string& LowerASCIIOnWindows(const std::string& string) {
return string;
-#endif
}
+#endif
#if defined(OS_WIN)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698