[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:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user