diff options
| author | 2018-11-21 01:59:27 -0500 | |
|---|---|---|
| committer | 2018-11-21 02:08:18 -0500 | |
| commit | 45211a7a9183f8f62cb3e90b6e718cf33e46bec6 (patch) | |
| tree | d7cc4e8b6083b5ec73a68794615bb56197da5bcc | |
| parent | common/math_util: Make Rectangle's constructors constexpr (diff) | |
| download | yuzu-45211a7a9183f8f62cb3e90b6e718cf33e46bec6.tar.gz yuzu-45211a7a9183f8f62cb3e90b6e718cf33e46bec6.tar.xz yuzu-45211a7a9183f8f62cb3e90b6e718cf33e46bec6.zip | |
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.
| -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}; |