1 #ifndef MISC_H |
1 #ifndef MISC_H |
2 #define MISC_H |
2 #define MISC_H |
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 str basename (str path); |
|
9 list<var> getVersionsList(); |
|
10 list<var> getReleasesList(); |
|
11 void addVersion (str name, bool isRelease, str binaryPath); |
9 |
12 |
10 // ----------------------------------------------------------------------------- |
13 // ----------------------------------------------------------------------------- |
11 // Templated clamp |
14 // Templated clamp |
12 template<class T> static inline T clamp (T a, T min, T max) { |
15 template<class T> static inline T clamp (T a, T min, T max) { |
13 return (a > max) ? max : (a < min) ? min : a; |
16 return (a > max) ? max : (a < min) ? min : a; |