X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d425deeb2ff4abe56e7b9cc85fa4e216ec94b36..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 456594d834..515d506d63 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -1012,9 +1012,11 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler) return dwExitCode; } -long wxExecute(wxChar **argv, int flags, wxProcess *handler) +template +long wxExecuteImpl(CharType **argv, int flags, wxProcess *handler) { wxString command; + command.reserve(1024); for ( ;; ) { @@ -1022,8 +1024,22 @@ long wxExecute(wxChar **argv, int flags, wxProcess *handler) if ( !*argv ) break; - command += _T(' '); + command += ' '; } return wxExecute(command, flags, handler); } + +long wxExecute(char **argv, int flags, wxProcess *handler) +{ + return wxExecuteImpl(argv, flags, handler); +} + +#if wxUSE_UNICODE + +long wxExecute(wchar_t **argv, int flags, wxProcess *handler) +{ + return wxExecuteImpl(argv, flags, handler); +} + +#endif // wxUSE_UNICODE