commit ac502713b4283ac256334f98eca93c793d598782 parent 170a466d53749d6c3f1d9fd6b4348a105e690c7b Author: Michael Savage <mikejsavage@gmail.com> Date: Wed Sep 14 16:02:22 +0100 Make slots_required a macro because VS2013 doesn't support constexpr Diffstat:
intrinsics.h | | | 4 | +--- |
diff --git a/intrinsics.h b/intrinsics.h @@ -84,9 +84,7 @@ T clamp11( T x ) { return clamp( x, T( -1 ), T( 1 ) ); } -inline constexpr size_t slots_required( size_t data_size, size_t slot_size ) { - return data_size / slot_size + ( data_size % slot_size != 0 ); -} +#define slots_required( data_size, slot_size ) ( ( data_size ) / ( slot_size ) + ( ( data_size ) % ( slot_size ) != 0 ) ) #include "platform_backtrace.h"