summaryrefslogtreecommitdiff
path: root/src/utils/process.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-26 01:40:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-26 01:40:00 +0300
commitd4febba47388979b26cd4680cb8a6f20e548e399 (patch)
tree2d520db672ed39b755e668828d27f0dd9d18ed6e /src/utils/process.cpp
parent803b6afd00b0e3574b40b866f21a0d3d01f6dc4d (diff)
downloadplus-d4febba47388979b26cd4680cb8a6f20e548e399.tar.gz
plus-d4febba47388979b26cd4680cb8a6f20e548e399.tar.bz2
plus-d4febba47388979b26cd4680cb8a6f20e548e399.tar.xz
plus-d4febba47388979b26cd4680cb8a6f20e548e399.zip
Improve string usage in other files.
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r--src/utils/process.cpp8
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,