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 --- Tools/GrownBiomeGenVisualiser/Globals.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Tools/GrownBiomeGenVisualiser') diff --git a/Tools/GrownBiomeGenVisualiser/Globals.h b/Tools/GrownBiomeGenVisualiser/Globals.h index 33c983bf3..f062b4ccf 100644 --- a/Tools/GrownBiomeGenVisualiser/Globals.h +++ b/Tools/GrownBiomeGenVisualiser/Globals.h @@ -234,6 +234,13 @@ T Clamp(T a_Value, T a_Min, T a_Max) return (a_Value < a_Min) ? a_Min : ((a_Value > a_Max) ? a_Max : a_Value); } +template +auto ToUnsigned(T a_Val) +{ + ASSERT(a_Val >= 0); + return static_cast>(a_Val); +} + -- cgit v1.2.3