diff options
Diffstat (limited to 'source/blender/imbuf/intern/dds/Common.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/Common.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h index e504e7b1241..6f09346f770 100644 --- a/source/blender/imbuf/intern/dds/Common.h +++ b/source/blender/imbuf/intern/dds/Common.h @@ -34,8 +34,20 @@ #ifndef clamp #define clamp(x,a,b) min(max((x), (a)), (b)) #endif -#ifndef swap -#define swap(a,b,tmp) tmp=a; a=b; b=tmp; -#endif + +template<typename T> +inline void +swap(T & a, T & b) +{ + T tmp = a; + a = b; + b = tmp; +} + +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned int uint; +typedef unsigned int uint32; +typedef unsigned long long uint64; #endif |