aboutsummaryrefslogtreecommitdiff
path: root/src/common/math_util.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-21 01:59:27 -0500
committerLioncash <mathew1800@gmail.com>2018-11-21 02:08:18 -0500
commit2c80a3e089dd43ae61a1188e3c45c995c61c9c68 (patch)
treed7cc4e8b6083b5ec73a68794615bb56197da5bcc /src/common/math_util.h
parentfb1339a38522a1cf3bbde5cb327fa0fb8dcd2d7b (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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index cf5ad8457b..94b4394c5d 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};