From 07fc3b77b186a27719125fe6fb60e34a8b52ca1e Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Sat, 30 Oct 2021 14:49:53 +1100 Subject: [PATCH] - Privatise `tosigned()` method in `binangle` class. --- source/core/binaryangle.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/core/binaryangle.h b/source/core/binaryangle.h index 4b033c31a..9f55c57ea 100644 --- a/source/core/binaryangle.h +++ b/source/core/binaryangle.h @@ -115,12 +115,13 @@ class binangle friend binangle degang(double v); friend FSerializer &Serialize(FSerializer &arc, const char *key, binangle &obj, binangle *defval); + + constexpr int32_t tosigned() const { return value > INT32_MAX ? int64_t(value) - UINT32_MAX : value; } public: binangle() = default; binangle(const binangle &other) = default; // This class intentionally makes no allowances for implicit type conversions because those would render it ineffective. - constexpr int32_t tosigned() const { return value > INT32_MAX ? int64_t(value) - UINT32_MAX : value; } constexpr short asbuild() const { return value >> BAMBITS; } constexpr double asbuildf() const { return value * (1. / BAMUNIT); } constexpr fixed_t asq16() const { return value >> 5; }