diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 3083cc01f0..ba07db1206 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -656,6 +656,8 @@ std::string PathToString(const std::filesystem::path& path) #endif } +namespace Common +{ #ifdef _WIN32 std::vector CommandLineToUtf8Argv(const wchar_t* command_line) { @@ -675,8 +677,6 @@ std::vector CommandLineToUtf8Argv(const wchar_t* command_line) } #endif -namespace Common -{ std::string GetEscapedHtml(std::string html) { static constexpr std::array, 5> replacements{{ diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index 84462b6c62..b18a25dd13 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -230,10 +230,6 @@ std::string ThousandSeparate(I value, int spaces = 0) #endif } -#ifdef _WIN32 -std::vector CommandLineToUtf8Argv(const wchar_t* command_line); -#endif - namespace Common { /// Returns whether a character is printable, i.e. whether 0x20 <= c <= 0x7e is true. @@ -262,6 +258,10 @@ inline char ToUpper(char ch) return std::toupper(ch, std::locale::classic()); } +#ifdef _WIN32 +std::vector CommandLineToUtf8Argv(const wchar_t* command_line); +#endif + std::string GetEscapedHtml(std::string html); void ToLower(std::string* str); diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index e8bb0958ab..9ba5de1e98 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -316,7 +316,7 @@ int main(int argc, char* argv[]) #ifdef _WIN32 int wmain(int, wchar_t*[], wchar_t*[]) { - std::vector args = CommandLineToUtf8Argv(GetCommandLineW()); + std::vector args = Common::CommandLineToUtf8Argv(GetCommandLineW()); const int argc = static_cast(args.size()); std::vector argv(args.size()); for (size_t i = 0; i < args.size(); ++i) diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index 7690f16315..a65f9d34fd 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -306,7 +306,7 @@ int main(int argc, char* argv[]) #ifdef _WIN32 int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int) { - std::vector args = CommandLineToUtf8Argv(GetCommandLineW()); + std::vector args = Common::CommandLineToUtf8Argv(GetCommandLineW()); const int argc = static_cast(args.size()); std::vector argv(args.size()); for (size_t i = 0; i < args.size(); ++i) diff --git a/Source/Core/DolphinTool/ToolMain.cpp b/Source/Core/DolphinTool/ToolMain.cpp index 15b27ab95a..59613a17f6 100644 --- a/Source/Core/DolphinTool/ToolMain.cpp +++ b/Source/Core/DolphinTool/ToolMain.cpp @@ -54,7 +54,7 @@ int main(int argc, char* argv[]) #ifdef _WIN32 int wmain(int, wchar_t*[], wchar_t*[]) { - std::vector args = CommandLineToUtf8Argv(GetCommandLineW()); + std::vector args = Common::CommandLineToUtf8Argv(GetCommandLineW()); const int argc = static_cast(args.size()); std::vector argv(args.size()); for (size_t i = 0; i < args.size(); ++i) diff --git a/Source/Core/WinUpdater/Main.cpp b/Source/Core/WinUpdater/Main.cpp index 20aa398fd2..bcf814c78d 100644 --- a/Source/Core/WinUpdater/Main.cpp +++ b/Source/Core/WinUpdater/Main.cpp @@ -62,7 +62,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine return 0; } - std::vector args = CommandLineToUtf8Argv(pCmdLine); + std::vector args = Common::CommandLineToUtf8Argv(pCmdLine); return RunUpdater(args) ? 0 : 1; }