diff options
author | Lioncash <mathew1800@gmail.com> | 2018-11-21 01:59:27 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-11-21 02:08:18 -0500 |
commit | 45211a7a9183f8f62cb3e90b6e718cf33e46bec6 (patch) | |
tree | d7cc4e8b6083b5ec73a68794615bb56197da5bcc /src/common/math_util.h | |
parent | f11173f88cac03eab021d27725805128d046fd0d (diff) |
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.
Diffstat (limited to 'src/common/math_util.h')
-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 { : left(left), top(top), right(right), bottom(bottom) {} 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 { - 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 { return Rectangle{left + x, top, right + x, bottom}; |