forked from qt-creator/qt-creator
CMake: Fix implicit size_t -> int warnings
Change-Id: I6261faad372050fba118f5f5d8db91207d94f941 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
c4c9af1bd8
commit
b1413e35f0
@@ -403,14 +403,14 @@ static expected_str<bool> insertSnippetSilently(const FilePath &cmakeFile,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void findLastRelevantArgument(const cmListFileFunction &function,
|
static void findLastRelevantArgument(const cmListFileFunction &function,
|
||||||
std::size_t minimumArgPos,
|
int minimumArgPos,
|
||||||
const QSet<QString> &lowerCaseStopParams,
|
const QSet<QString> &lowerCaseStopParams,
|
||||||
QString *lastRelevantArg,
|
QString *lastRelevantArg,
|
||||||
int *lastRelevantPos)
|
int *lastRelevantPos)
|
||||||
{
|
{
|
||||||
const std::vector<cmListFileArgument> args = function.Arguments();
|
const std::vector<cmListFileArgument> args = function.Arguments();
|
||||||
*lastRelevantPos = args.size() - 1;
|
*lastRelevantPos = int(args.size()) - 1;
|
||||||
for (int i = minimumArgPos, end = args.size(); i < end; ++i) {
|
for (int i = minimumArgPos, end = int(args.size()); i < end; ++i) {
|
||||||
const QString lowerArg = QString::fromStdString(args.at(i).Value).toLower();
|
const QString lowerArg = QString::fromStdString(args.at(i).Value).toLower();
|
||||||
if (lowerCaseStopParams.contains(lowerArg)) {
|
if (lowerCaseStopParams.contains(lowerArg)) {
|
||||||
*lastRelevantPos = i - 1;
|
*lastRelevantPos = i - 1;
|
||||||
@@ -466,7 +466,7 @@ static std::optional<cmListFileFunction> handleTSAddVariant(const cmListFile &cm
|
|||||||
std::optional<cmListFileFunction> setFunc = findSetFunctionFor(cmakeListFile, var);
|
std::optional<cmListFileFunction> setFunc = findSetFunctionFor(cmakeListFile, var);
|
||||||
if (setFunc) {
|
if (setFunc) {
|
||||||
function = *setFunc;
|
function = *setFunc;
|
||||||
*lastArgumentPos = function->Arguments().size() - 1;
|
*lastArgumentPos = int(function->Arguments().size()) - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user