summaryrefslogtreecommitdiff
path: root/src/utils/process.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
commit351821c1f18f9285be58df0a05339936311f6490 (patch)
tree47a60cad4f61f63c5ac2faf98dcae24760d7fe11 /src/utils/process.cpp
parente50632a83a3c679cffd372656277a304d5d853f8 (diff)
downloadplus-351821c1f18f9285be58df0a05339936311f6490.tar.gz
plus-351821c1f18f9285be58df0a05339936311f6490.tar.bz2
plus-351821c1f18f9285be58df0a05339936311f6490.tar.xz
plus-351821c1f18f9285be58df0a05339936311f6490.zip
first part of style fixed after cpplint checks.
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r--src/utils/process.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index 538d7274e..ec9eea548 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -49,15 +49,15 @@ int execFileWait(std::string pathName, std::string name A_UNUSED,
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
- siStartupInfo.cb = sizeof(siStartupInfo);
+ siStartupInfo.cb = sizeof(siStartupInfo);
DWORD ret = -1;
std::string args(std::string(pathName).append(" ").append(arg1));
if (!arg2.empty())
args.append(" ").append(arg2);
- if (CreateProcess(pathName.c_str(), (char*)args.c_str(), nullptr, nullptr,
- false, CREATE_DEFAULT_ERROR_MODE, nullptr, nullptr, &siStartupInfo,
- &piProcessInfo) != false)
+ if (CreateProcess(pathName.c_str(), static_cast<char*>(args.c_str()),
+ nullptr, nullptr, false, CREATE_DEFAULT_ERROR_MODE, nullptr, nullptr,
+ &siStartupInfo, &piProcessInfo) != false)
{
if (!WaitForSingleObject(piProcessInfo.hProcess, timeOut * 1000))
{
@@ -83,7 +83,7 @@ bool execFile(std::string pathName, std::string name A_UNUSED,
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
- siStartupInfo.cb = sizeof(siStartupInfo);
+ siStartupInfo.cb = sizeof(siStartupInfo);
std::string args(std::string(pathName).append(" ").append(arg1));
if (!arg2.empty())
args.append(" ").append(arg2);
@@ -149,8 +149,7 @@ int execFileWait(std::string pathName, std::string name,
}
else if (!sleep_pid)
{ // sleep pid
- sleep (waitTime);
-// printf ("time out\n");
+ sleep(waitTime);
execl("/bin/true", "/bin/true", static_cast<char *>(nullptr));
_exit(-1);
}
@@ -232,8 +231,9 @@ bool execFile(std::string pathName, std::string name,
#ifdef WIN32
bool openBrowser(std::string url)
{
- return (int)ShellExecute(nullptr, "open", replaceAll(url, " ", "").c_str(),
- nullptr, nullptr, SW_SHOWNORMAL) > 32;
+ return static_cast<int>(ShellExecute(nullptr, "open",
+ replaceAll(url, " ", "").c_str(),
+ nullptr, nullptr, SW_SHOWNORMAL)) > 32;
}
#elif defined ANDROID
#include <SDL_screenkeyboard.h>