diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/imbuf/intern/dds/Common.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/imbuf/intern/dds/Common.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/Common.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h index 1a7d087ec2e..56f5d54cf42 100644 --- a/source/blender/imbuf/intern/dds/Common.h +++ b/source/blender/imbuf/intern/dds/Common.h @@ -18,39 +18,36 @@ * \ingroup imbdds */ - #ifndef __COMMON_H__ #define __COMMON_H__ #ifndef MIN -#define MIN(a,b) ((a) <= (b) ? (a) : (b)) +# define MIN(a, b) ((a) <= (b) ? (a) : (b)) #endif #ifndef MAX -#define MAX(a,b) ((a) >= (b) ? (a) : (b)) +# define MAX(a, b) ((a) >= (b) ? (a) : (b)) #endif #ifndef CLAMP -#define CLAMP(x,a,b) MIN(MAX((x), (a)), (b)) +# define CLAMP(x, a, b) MIN(MAX((x), (a)), (b)) #endif -template<typename T> -inline void -swap(T & a, T & b) +template<typename T> inline void swap(T &a, T &b) { - T tmp = a; - a = b; - b = tmp; + 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 char uint8; +typedef unsigned short uint16; +typedef unsigned int uint; +typedef unsigned int uint32; typedef unsigned long long uint64; // copied from nvtt src/nvimage/nvimage.h inline uint computePitch(uint w, uint bitsize, uint alignment) { - return ((w * bitsize + 8 * alignment - 1) / (8 * alignment)) * alignment; + return ((w * bitsize + 8 * alignment - 1) / (8 * alignment)) * alignment; } #endif |