From 7db137bef342feaca802de0533b31ec0fc157767 Mon Sep 17 00:00:00 2001 From: hubbe <> Date: Mon, 20 Aug 2018 04:14:33 +0000 Subject: [PATCH] test fix --- styles/tests.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/styles/tests.cpp b/styles/tests.cpp index b005b0867..e0611d7af 100644 --- a/styles/tests.cpp +++ b/styles/tests.cpp @@ -17,6 +17,11 @@ float fract(float x) { return x - floor(x); } uint32_t micros_ = 0; uint32_t micros() { return micros_; } +int32_t clampi32(int32_t x, int32_t a, int32_t b) { + if (x < a) return a; + if (x > b) return b; + return x; +} // This really ought to be a typedef, but it causes problems I don't understand. #define StyleAllocator class StyleFactory*