summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 0104f3b..bbd25b8 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -299,9 +299,11 @@ std::wstring CommandLine::program() const {
// static
std::wstring CommandLine::PrefixedSwitchString(
const std::wstring& switch_string) {
- return StringPrintf(L"%ls%ls",
- kSwitchPrefixes[0],
- switch_string.c_str());
+#if defined(OS_WIN)
+ return kSwitchPrefixes[0] + switch_string;
+#else
+ return ASCIIToWide(kSwitchPrefixes[0]) + switch_string;
+#endif
}
// static
@@ -311,11 +313,13 @@ std::wstring CommandLine::PrefixedSwitchStringWithValue(
return PrefixedSwitchString(switch_string);
}
- return StringPrintf(L"%ls%ls%ls%ls",
- kSwitchPrefixes[0],
- switch_string.c_str(),
- kSwitchValueSeparator,
- value_string.c_str());
+ return PrefixedSwitchString(switch_string +
+#if defined(OS_WIN)
+ kSwitchValueSeparator +
+#else
+ ASCIIToWide(kSwitchValueSeparator) +
+#endif
+ value_string);
}
#if defined(OS_WIN)