Bladeren bron

common/math_util: Simplify std::make_signed usages to std::make_signed_t

Gets rid of the need to use typename to access the ::type alias.
Lioncash 7 jaren geleden
bovenliggende
commit
45211a7a91
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      src/common/math_util.h

+ 2 - 2
src/common/math_util.h

@@ -24,10 +24,10 @@ struct Rectangle {
         : left(left), top(top), right(right), bottom(bottom) {}
         : left(left), top(top), right(right), bottom(bottom) {}
 
 
     T GetWidth() const {
     T GetWidth() const {
-        return std::abs(static_cast<typename std::make_signed<T>::type>(right - left));
+        return std::abs(static_cast<std::make_signed_t<T>>(right - left));
     }
     }
     T GetHeight() const {
     T GetHeight() const {
-        return std::abs(static_cast<typename std::make_signed<T>::type>(bottom - top));
+        return std::abs(static_cast<std::make_signed_t<T>>(bottom - top));
     }
     }
     Rectangle<T> TranslateX(const T x) const {
     Rectangle<T> TranslateX(const T x) const {
         return Rectangle{left + x, top, right + x, bottom};
         return Rectangle{left + x, top, right + x, bottom};