From 1123c95cf2efdcb23ff557b956d58538ca24aefe Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Sat, 9 May 2020 16:51:54 +0100 Subject: Enable C++17 in build --- src/Globals.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 02b007e09..e6fde373e 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -390,6 +390,13 @@ using cTickTimeLong = std::chrono::duration; #error TOLUA_EXPOSITION should never actually be defined #endif +template +auto ToUnsigned(T a_Val) +{ + ASSERT(a_Val >= 0); + return static_cast>(a_Val); +} + -- cgit v1.2.3