src/misc.h

changeset 8
e8f645d9f28f
parent 6
67b6ef6917ba
child 10
bc1414343e19
equal deleted inserted replaced
7:fdabb5869e5f 8:e8f645d9f28f
3 3
4 #include "types.h" 4 #include "types.h"
5 5
6 uint32 makeByteID( uint8 a, uint8 b, uint8 c, uint8 d ); 6 uint32 makeByteID( uint8 a, uint8 b, uint8 c, uint8 d );
7 str binaryConfigName( str ver ); 7 str binaryConfigName( str ver );
8 str basename( str path );
8 9
9 // ----------------------------------------------------------------------------- 10 // -----------------------------------------------------------------------------
10 // Templated clamp 11 // Templated clamp
11 template<class T> static inline T clamp (T a, T min, T max) { 12 template<class T> static inline T clamp (T a, T min, T max) {
12 return (a > max) ? max : (a < min) ? min : a; 13 return (a > max) ? max : (a < min) ? min : a;

mercurial