Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-08 10:40:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-08 10:40:03 +0400
commita9f10b6bc2fb55be26ae3a7e8b1467213678a0f6 (patch)
tree12ac3a6320add8687c455cc7065b6eef0a73de7d /source/blender/blenlib
parentc95d4f68b863c851d0b8bddef8092fdc0932610e (diff)
style cleanup
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_math_base.h5
-rw-r--r--source/blender/blenlib/BLI_utildefines.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 4a89776a52e..886ed6f495d 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -164,7 +164,10 @@
#endif
#ifndef CLAMP
-# define CLAMP(a, b, c) if ((a) < (b)) (a) = (b); else if ((a) > (c)) (a) = (c)
+# define CLAMP(a, b, c) { \
+ if ((a) < (b)) (a) = (b); \
+ else if ((a) > (c)) (a) = (c); \
+} (void)0
#endif
#ifdef __BLI_MATH_INLINE_H__
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index c11d8ed55be..29097a4c6c3 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -198,7 +198,10 @@
#define INPR(v1, v2) ( (v1)[0] * (v2)[0] + (v1)[1] * (v2)[1] + (v1)[2] * (v2)[2])
/* some misc stuff.... */
-#define CLAMP(a, b, c) if ((a) < (b)) (a) = (b); else if ((a) > (c)) (a) = (c)
+#define CLAMP(a, b, c) { \
+ if ((a) < (b)) (a) = (b); \
+ else if ((a) > (c)) (a) = (c); \
+} (void)0
#define CLAMPIS(a, b, c) ((a) < (b) ? (b) : (a) > (c) ? (c) : (a))
#define CLAMPTEST(a, b, c) \