gcc: fixed some more -Wsign-conversion warnings

This commit is contained in:
Daniel Marjamäki 2010-08-06 22:43:06 +02:00
parent 12217461a2
commit 7911626aed
2 changed files with 8 additions and 8 deletions

View File

@ -75,20 +75,20 @@ std::string FileLister::simplifyPath(const char *originalPath)
{ {
if (pathParts[i] == ".." && i > 1 && pathParts.size() > i + 1) if (pathParts[i] == ".." && i > 1 && pathParts.size() > i + 1)
{ {
pathParts.erase(pathParts.begin() + i + 1); pathParts.erase(pathParts.begin() + static_cast<int>(i) + 1);
pathParts.erase(pathParts.begin() + i); pathParts.erase(pathParts.begin() + static_cast<int>(i));
pathParts.erase(pathParts.begin() + i - 1); pathParts.erase(pathParts.begin() + static_cast<int>(i) - 1);
pathParts.erase(pathParts.begin() + i - 2); pathParts.erase(pathParts.begin() + static_cast<int>(i) - 2);
i = 0; i = 0;
} }
else if (i > 0 && pathParts[i] == ".") else if (i > 0 && pathParts[i] == ".")
{ {
pathParts.erase(pathParts.begin() + i); pathParts.erase(pathParts.begin() + static_cast<int>(i));
i = 0; i = 0;
} }
else if (pathParts[i] == "/" && i > 0 && pathParts[i-1] == "/") else if (pathParts[i] == "/" && i > 0 && pathParts[i-1] == "/")
{ {
pathParts.erase(pathParts.begin() + i - 1); pathParts.erase(pathParts.begin() + static_cast<int>(i) - 1);
i = 0; i = 0;
} }
} }

View File

@ -6765,7 +6765,7 @@ void Tokenizer::fillFunctionList()
if (_functionList[func1]->str() == _functionList[func2]->str()) if (_functionList[func1]->str() == _functionList[func2]->str())
{ {
hasDuplicates = true; hasDuplicates = true;
_functionList.erase(_functionList.begin() + func2); _functionList.erase(_functionList.begin() + static_cast<int>(func2));
} }
else else
{ {
@ -6779,7 +6779,7 @@ void Tokenizer::fillFunctionList()
} }
else else
{ {
_functionList.erase(_functionList.begin() + func1); _functionList.erase(_functionList.begin() + static_cast<int>(func1));
} }
} }
} }