diff --git a/include/bx/inline/bx.inl b/include/bx/inline/bx.inl index 8a4907f..759a9f2 100644 --- a/include/bx/inline/bx.inl +++ b/include/bx/inline/bx.inl @@ -298,6 +298,8 @@ namespace bx return static_cast(_from); } +BX_PRAGMA_DIAGNOSTIC_PUSH() +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4702) // warning C4702: unreachable code template inline constexpr bool narrowCastTest(Ty* _out, const FromT& _from) { @@ -307,12 +309,10 @@ namespace bx return true; } -BX_PRAGMA_DIAGNOSTIC_PUSH() -BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4702) // warning C4702: unreachable code *_out = static_cast(_from); return static_cast(*_out) == _from; -BX_PRAGMA_DIAGNOSTIC_POP() } +BX_PRAGMA_DIAGNOSTIC_POP() template inline Ty narrowCast(const FromT& _from, Location _location)