diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-26 01:40:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-26 01:40:00 +0300 |
commit | d4febba47388979b26cd4680cb8a6f20e548e399 (patch) | |
tree | 2d520db672ed39b755e668828d27f0dd9d18ed6e /src/utils/process.cpp | |
parent | 803b6afd00b0e3574b40b866f21a0d3d01f6dc4d (diff) | |
download | ManaVerse-d4febba47388979b26cd4680cb8a6f20e548e399.tar.gz ManaVerse-d4febba47388979b26cd4680cb8a6f20e548e399.tar.bz2 ManaVerse-d4febba47388979b26cd4680cb8a6f20e548e399.tar.xz ManaVerse-d4febba47388979b26cd4680cb8a6f20e548e399.zip |
Improve string usage in other files.
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r-- | src/utils/process.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp index bba018195..b24949cfe 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -51,9 +51,9 @@ int execFileWait(std::string pathName, std::string name A_UNUSED, memset(&piProcessInfo, 0, sizeof(piProcessInfo)); siStartupInfo.cb = sizeof(siStartupInfo); DWORD ret = -1; - std::string args(pathName + " " + arg1); + std::string args(std::string(pathName).append(" ").append(arg1)); if (!arg2.empty()) - args += " " + arg2; + args.append(" ").append(arg2); if (CreateProcess(pathName.c_str(), (char*)args.c_str(), nullptr, nullptr, false, CREATE_DEFAULT_ERROR_MODE, nullptr, nullptr, &siStartupInfo, @@ -84,9 +84,9 @@ bool execFile(std::string pathName, std::string name A_UNUSED, memset(&siStartupInfo, 0, sizeof(siStartupInfo)); memset(&piProcessInfo, 0, sizeof(piProcessInfo)); siStartupInfo.cb = sizeof(siStartupInfo); - std::string args(pathName + " " + arg1); + std::string args(std::string(pathName).append(" ").append(arg1)); if (!arg2.empty()) - args += " " + arg2; + args.append(" ").append(arg2); bool res = CreateProcess(pathName.c_str(), const_cast<char*>( args.c_str()), nullptr, nullptr, false, |