[msvc] Fix warnings, mainly casting to smaller types (#270)

If the checks by GitHub Actions checks are met, then it seems good to go.  Thanks for supporting FOSS4G!
This commit is contained in:
Tadej Novak
2022-04-22 20:40:55 +02:00
committed by GitHub
parent cf41e113f9
commit 32ed70c95d
121 changed files with 645 additions and 459 deletions

View File

@@ -183,7 +183,7 @@ struct Converter<int64_t> {
if (!converted) {
return nullopt;
}
return *converted;
return static_cast<int64_t>(*converted);
}
};
@@ -219,7 +219,7 @@ static optional<std::unique_ptr<Expression>> convertLiteral(type::Type type, con
if (!result) {
return nullopt;
}
return literal(double(*result));
return literal(static_cast<double>(*result));
},
[&](const type::BooleanType&) -> optional<std::unique_ptr<Expression>> {
auto result = convert<bool>(value, error);
@@ -261,7 +261,7 @@ static optional<std::unique_ptr<Expression>> convertLiteral(type::Type type, con
error.message = "value must be an array of numbers";
return nullopt;
}
result.emplace_back(double(*number));
result.emplace_back(static_cast<double>(*number));
}
return literal(result);
},