summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-11 18:09:33 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-11 18:09:33 +0300
commit17dcb835103ac05012c5a7eafa8c7702cef53390 (patch)
tree422c28adfba13f2161fcfc36943a3903e531490b /src/utils
parent84d53b7bb98bb44696ed1bc2c3f132e51394ac00 (diff)
downloadplus-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.gz
plus-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.bz2
plus-17dcb835103ac05012c5a7eafa8c7702cef53390.tar.xz
plus-17dcb835103ac05012c5a7eafa8c7702cef53390.zip
Add some fixes after automatic checks.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/process.cpp4
-rw-r--r--src/utils/stringutils.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index b24949cfe..dbc314921 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -42,8 +42,8 @@ const int timeOut = 10;
int execFileWait(std::string pathName, std::string name A_UNUSED,
std::string arg1, std::string arg2, int waitTime)
{
- if (!waitTime)
- waitTime = timeOut;
+// if (!waitTime)
+// waitTime = timeOut;
STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 3378ec132..1994cda98 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -207,12 +207,11 @@ size_t findI(std::string str, std::string subStr)
size_t findI(std::string text, StringVect &list)
{
std::string str = toLower(text);
- size_t idx;
FOR_EACH (StringVectCIter, i, list)
{
std::string subStr = *i;
subStr = toLower(subStr);
- idx = str.find(subStr);
+ const size_t idx = str.find(subStr);
if (idx != std::string::npos)
return idx;
}
@@ -375,11 +374,10 @@ bool getBoolFromString(const std::string &text)
void replaceSpecialChars(std::string &text)
{
- size_t idx = 0;
size_t pos1 = text.find("&");
while (pos1 != std::string::npos)
{
- idx = pos1 + 1;
+ const size_t idx = pos1 + 1;
if (idx >= text.size())
break;