core: Fix clang build

Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
This commit is contained in:
Lioncash 2020-10-15 14:49:45 -04:00
parent 72df55f8a5
commit 18636013c9
105 changed files with 906 additions and 667 deletions

View file

@ -27,7 +27,7 @@ struct Rectangle {
if constexpr (std::is_floating_point_v<T>) {
return std::abs(right - left);
} else {
return std::abs(static_cast<std::make_signed_t<T>>(right - left));
return static_cast<T>(std::abs(static_cast<std::make_signed_t<T>>(right - left)));
}
}
@ -35,7 +35,7 @@ struct Rectangle {
if constexpr (std::is_floating_point_v<T>) {
return std::abs(bottom - top);
} else {
return std::abs(static_cast<std::make_signed_t<T>>(bottom - top));
return static_cast<T>(std::abs(static_cast<std::make_signed_t<T>>(bottom - top)));
}
}