diff options
| -rw-r--r-- | src/common/math_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h index cf5ad8457..94b4394c5 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h | |||
| @@ -24,10 +24,10 @@ struct Rectangle { | |||
| 24 | : left(left), top(top), right(right), bottom(bottom) {} | 24 | : left(left), top(top), right(right), bottom(bottom) {} |
| 25 | 25 | ||
| 26 | T GetWidth() const { | 26 | T GetWidth() const { |
| 27 | return std::abs(static_cast<typename std::make_signed<T>::type>(right - left)); | 27 | return std::abs(static_cast<std::make_signed_t<T>>(right - left)); |
| 28 | } | 28 | } |
| 29 | T GetHeight() const { | 29 | T GetHeight() const { |
| 30 | return std::abs(static_cast<typename std::make_signed<T>::type>(bottom - top)); | 30 | return std::abs(static_cast<std::make_signed_t<T>>(bottom - top)); |
| 31 | } | 31 | } |
| 32 | Rectangle<T> TranslateX(const T x) const { | 32 | Rectangle<T> TranslateX(const T x) const { |
| 33 | return Rectangle{left + x, top, right + x, bottom}; | 33 | return Rectangle{left + x, top, right + x, bottom}; |