diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 12:26:26 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-04 12:26:26 +0300 |
commit | 371ddda4d0b3c2ef0c40f604715db801dc33b669 (patch) | |
tree | 436685331cde6d6494b132c6665a3fca43d2e9e3 /source/blender/editors/uvedit | |
parent | aa4cf47e403ba3f098d89e991dafc9fec30423c4 (diff) |
Cleanup: Clang-Tidy readability-redundant-preprocessor fixes
Remove redundantly nested `#if` and `#ifdef` statements.
One nested `#if 0` block was left untouched, as it's in particle code
that's no longer maintained. Furthermore, that block also has some
explanation as to the differences between the enabled & disabled parts.
One nested `#if 0` construct was completely removed, leaving only the
actually used bit of code. There was no explanation as to the usefulness
of the disabled code, and it hasn't been touched in years.
No functional changes.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index f6485fdef5d..8d30dc19732 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -43,29 +43,13 @@ /* Utils */ -#if 0 -# define param_assert(condition) -# define param_warning(message) -# define param_test_equals_ptr(condition) -# define param_test_equals_int(condition) -#else -# define param_assert(condition) \ - if (!(condition)) { /*printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();*/ \ - } \ - (void)0 -# define param_warning(message) \ - {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 -# if 0 -# define param_test_equals_ptr(str, a, b) \ - if (a != b) { /*printf("Equals %s => %p != %p\n", str, a, b);*/ \ - } \ - (void)0 -# define param_test_equals_int(str, a, b) \ - if (a != b) { /*printf("Equals %s => %d != %d\n", str, a, b);*/ \ - } \ - (void)0 -# endif -#endif +#define param_assert(condition) \ + if (!(condition)) { /*printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();*/ \ + } \ + (void)0 +#define param_warning(message) \ + {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 + typedef enum PBool { P_TRUE = 1, P_FALSE = 0, |