From 046c0c91a3ed665531f20955e7cfb86fe5b73213 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Oct 2020 02:51:14 -0400 Subject: input_common/CMakeLists: Make some warnings errors Makes the input_common code warnings consistent with the rest of the codebase. --- src/common/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/math_util.h') diff --git a/src/common/math_util.h b/src/common/math_util.h index b35ad8507..7cec80d57 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -20,8 +20,8 @@ struct Rectangle { constexpr Rectangle() = default; - constexpr Rectangle(T left, T top, T right, T bottom) - : left(left), top(top), right(right), bottom(bottom) {} + constexpr Rectangle(T left_, T top_, T right_, T bottom_) + : left(left_), top(top_), right(right_), bottom(bottom_) {} [[nodiscard]] T GetWidth() const { if constexpr (std::is_floating_point_v) { -- cgit v1.2.3 From be1954e04cb5a0c3a526f78ed5490a5e65310280 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 15 Oct 2020 14:49:45 -0400 Subject: core: Fix clang build Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795 --- src/common/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/math_util.h') diff --git a/src/common/math_util.h b/src/common/math_util.h index b35ad8507..661c056ca 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -27,7 +27,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(right - left); } else { - return std::abs(static_cast>(right - left)); + return static_cast(std::abs(static_cast>(right - left))); } } @@ -35,7 +35,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(bottom - top); } else { - return std::abs(static_cast>(bottom - top)); + return static_cast(std::abs(static_cast>(bottom - top))); } } -- cgit v1.2.3 From 3d592972dc3fd61cc88771b889eff237e4e03e0f Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 20 Oct 2020 19:07:39 -0700 Subject: Revert "core: Fix clang build" --- src/common/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/math_util.h') diff --git a/src/common/math_util.h b/src/common/math_util.h index 4c38d8040..7cec80d57 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -27,7 +27,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(right - left); } else { - return static_cast(std::abs(static_cast>(right - left))); + return std::abs(static_cast>(right - left)); } } @@ -35,7 +35,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(bottom - top); } else { - return static_cast(std::abs(static_cast>(bottom - top))); + return std::abs(static_cast>(bottom - top)); } } -- cgit v1.2.3 From ea20b5c970cb261df93743803a227fafd5403d02 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 21 Oct 2020 22:14:21 -0400 Subject: core: Fix clang build pt.3 Should finally resolve building with clang. --- src/common/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/math_util.h') diff --git a/src/common/math_util.h b/src/common/math_util.h index 7cec80d57..4c38d8040 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -27,7 +27,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(right - left); } else { - return std::abs(static_cast>(right - left)); + return static_cast(std::abs(static_cast>(right - left))); } } @@ -35,7 +35,7 @@ struct Rectangle { if constexpr (std::is_floating_point_v) { return std::abs(bottom - top); } else { - return std::abs(static_cast>(bottom - top)); + return static_cast(std::abs(static_cast>(bottom - top))); } } -- cgit v1.2.3