Merge pull request #4796 from lioncash/clang

core: Fix clang build
This commit is contained in:
LC 2020-10-20 19:19:12 -04:00 committed by GitHub
commit 88d5140cf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)));
}
}