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>2020-09-19 09:01:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-19 09:28:17 +0300
commit14b2a35c8bfd6d77f6357f929ddd82845436725f (patch)
tree54746d6a3cf0da24b95d2a9761e6222656eb5249 /source/blender/makesdna
parent17a2820da8ad8ea23d336129f32e060e5746b047 (diff)
Cleanup: use parenthesis for if statements in macros
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h6
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index e16a22f5459..1e24ec24dc2 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -511,8 +511,10 @@ typedef enum ID_Type {
((ID *)(_id))->newid->tag |= LIB_TAG_NEW, \
(void *)((ID *)(_id))->newid)
#define ID_NEW_REMAP(a) \
- if ((a) && (a)->id.newid) \
- (a) = (void *)(a)->id.newid
+ if ((a) && (a)->id.newid) { \
+ (a) = (void *)(a)->id.newid; \
+ } \
+ ((void)0)
/** id->flag (persitent). */
enum {
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index b60dcb67224..e83353e04df 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -985,8 +985,9 @@ typedef enum ePathCompare_Flag {
/* Helper macro for checking frame clamping */
#define FRAMENUMBER_MIN_CLAMP(cfra) \
{ \
- if ((U.flag & USER_NONEGFRAMES) && (cfra < 0)) \
+ if ((U.flag & USER_NONEGFRAMES) && (cfra < 0)) { \
cfra = 0; \
+ } \
} \
(void)0