Fixing warnings in wxdata

This commit is contained in:
Dan Paulat 2022-06-11 06:35:53 -05:00
parent 05d795d18f
commit 3339a40780
17 changed files with 36 additions and 43 deletions

View file

@ -306,17 +306,17 @@ ParseColor(const std::vector<std::string>& tokenList,
template<typename T>
T RoundChannel(double value)
{
return std::clamp<int>(std::lround(value),
std::numeric_limits<T>::min(),
std::numeric_limits<T>::max());
return static_cast<T>(std::clamp<int>(std::lround(value),
std::numeric_limits<T>::min(),
std::numeric_limits<T>::max()));
}
template<typename T>
T StringToDecimal(const std::string& str)
{
return std::clamp<int>(std::stoi(str),
std::numeric_limits<T>::min(),
std::numeric_limits<T>::max());
return static_cast<T>(std::clamp<int>(std::stoi(str),
std::numeric_limits<T>::min(),
std::numeric_limits<T>::max()));
}
} // namespace common

View file

@ -77,7 +77,7 @@ static const std::unordered_map<Level3ProductCategory, std::string>
{Level3ProductCategory::SpecificDifferentialPhase, "N0K"},
{Level3ProductCategory::CorrelationCoefficient, "N0C"}};
static const std::unordered_map<int16_t, std::string> level3Palette_ {
static const std::unordered_map<int, std::string> level3Palette_ {
{19, "BR"}, {20, "BR"}, {27, "BV"}, {30, "SW"},
{31, "STPIN"}, {32, "BR"}, {37, "BR"}, {38, "BR"},
{41, "ET"}, {50, "BR"}, {51, "BV"}, {56, "SRV"},