diff --git a/lib/filelister.cpp b/lib/filelister.cpp index 6a25f256d..a15d8b366 100644 --- a/lib/filelister.cpp +++ b/lib/filelister.cpp @@ -75,20 +75,20 @@ std::string FileLister::simplifyPath(const char *originalPath) { if (pathParts[i] == ".." && i > 1 && pathParts.size() > i + 1) { - pathParts.erase(pathParts.begin() + i + 1); - pathParts.erase(pathParts.begin() + i); - pathParts.erase(pathParts.begin() + i - 1); - pathParts.erase(pathParts.begin() + i - 2); + pathParts.erase(pathParts.begin() + static_cast(i) + 1); + pathParts.erase(pathParts.begin() + static_cast(i)); + pathParts.erase(pathParts.begin() + static_cast(i) - 1); + pathParts.erase(pathParts.begin() + static_cast(i) - 2); i = 0; } else if (i > 0 && pathParts[i] == ".") { - pathParts.erase(pathParts.begin() + i); + pathParts.erase(pathParts.begin() + static_cast(i)); i = 0; } else if (pathParts[i] == "/" && i > 0 && pathParts[i-1] == "/") { - pathParts.erase(pathParts.begin() + i - 1); + pathParts.erase(pathParts.begin() + static_cast(i) - 1); i = 0; } } diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 38c65cbbc..51da1ea92 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -6765,7 +6765,7 @@ void Tokenizer::fillFunctionList() if (_functionList[func1]->str() == _functionList[func2]->str()) { hasDuplicates = true; - _functionList.erase(_functionList.begin() + func2); + _functionList.erase(_functionList.begin() + static_cast(func2)); } else { @@ -6779,7 +6779,7 @@ void Tokenizer::fillFunctionList() } else { - _functionList.erase(_functionList.begin() + func1); + _functionList.erase(_functionList.begin() + static_cast(func1)); } } }