Cleanup: macro hygiene, use parenthesis around operators
This commit is contained in:
@@ -1700,7 +1700,7 @@ typedef struct WorkTile {
|
||||
} WorkTile;
|
||||
|
||||
/* Pre-computed sample table sizes for PMJ02 sampler. */
|
||||
#define NUM_PMJ_SAMPLES 64 * 64
|
||||
#define NUM_PMJ_SAMPLES (64 * 64)
|
||||
#define NUM_PMJ_PATTERNS 48
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
@@ -46,11 +46,11 @@ size_t count_utf_16_from_8(const char *string8);
|
||||
/**
|
||||
* conv_utf_*** errors
|
||||
*/
|
||||
#define UTF_ERROR_NULL_IN 1 << 0 /* Error occures when requered parameter is missing*/
|
||||
#define UTF_ERROR_ILLCHAR 1 << 1 /* Error if character is in illigal UTF rage*/
|
||||
#define UTF_ERROR_NULL_IN (1 << 0) /* Error occures when requered parameter is missing*/
|
||||
#define UTF_ERROR_ILLCHAR (1 << 1) /* Error if character is in illigal UTF rage*/
|
||||
#define UTF_ERROR_SMALL \
|
||||
1 << 2 /* Passed size is to small. It gives legal string with character missing at the end*/
|
||||
#define UTF_ERROR_ILLSEQ 1 << 3 /* Error if sequence is broken and doesn't finish*/
|
||||
(1 << 2) /* Passed size is to small. It gives legal string with character missing at the end */
|
||||
#define UTF_ERROR_ILLSEQ (1 << 3) /* Error if sequence is broken and doesn't finish*/
|
||||
|
||||
/**
|
||||
* Converts utf-16 string to allocated utf-8 string
|
||||
|
@@ -158,7 +158,7 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
|
||||
return mem;
|
||||
}
|
||||
|
||||
#define CHUNK 256 * 1024
|
||||
#define CHUNK (256 * 1024)
|
||||
|
||||
/* gzip byte array from memory and write it to file at certain position.
|
||||
* return size of gzip stream.
|
||||
|
@@ -58,9 +58,9 @@
|
||||
#define BEVEL_EPSILON_ANG DEG2RADF(2.0f)
|
||||
#define BEVEL_SMALL_ANG DEG2RADF(10.0f)
|
||||
/** Difference in dot products that corresponds to 10 degree difference between vectors. */
|
||||
#define BEVEL_SMALL_ANG_DOT 1 - cosf(BEVEL_SMALL_ANG)
|
||||
#define BEVEL_SMALL_ANG_DOT (1.0f - cosf(BEVEL_SMALL_ANG))
|
||||
/** Difference in dot products that corresponds to 2.0 degree difference between vectors. */
|
||||
#define BEVEL_EPSILON_ANG_DOT 1 - cosf(BEVEL_EPSILON_ANG)
|
||||
#define BEVEL_EPSILON_ANG_DOT (1.0f - cosf(BEVEL_EPSILON_ANG))
|
||||
#define BEVEL_MAX_ADJUST_PCT 10.0f
|
||||
#define BEVEL_MAX_AUTO_ADJUST_PCT 300.0f
|
||||
#define BEVEL_MATCH_SPEC_WEIGHT 0.2
|
||||
|
@@ -39,7 +39,7 @@
|
||||
|
||||
#define KDOP_TREE_TYPE 4
|
||||
#define KDOP_AXIS_LEN 14
|
||||
#define BLI_STACK_PAIR_LEN 2 * KDOP_TREE_TYPE
|
||||
#define BLI_STACK_PAIR_LEN (2 * KDOP_TREE_TYPE)
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Weld Linked Wire Edges into Linked Faces
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
/* Keep the same value of `ACTIVE_NURB` in `draw_cache_imp_curve.c` */
|
||||
#define ACTIVE_NURB 1 << 2
|
||||
#define EVEN_U_BIT 1 << 4
|
||||
#define ACTIVE_NURB (1 << 2)
|
||||
#define EVEN_U_BIT (1 << 4)
|
||||
#define COLOR_SHIFT 5
|
||||
|
||||
/* Keep the same value in `handle_display` in `DNA_view3d_types.h` */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
/* Keep the same value of `BEZIER_HANDLE` in `draw_cache_imp_curve.c` */
|
||||
#define BEZIER_HANDLE 1 << 3
|
||||
#define BEZIER_HANDLE (1 << 3)
|
||||
|
||||
/* Keep the same value in `handle_display` in `DNA_view3d_types.h` */
|
||||
#define CURVE_HANDLE_SELECTED 0
|
||||
|
@@ -50,9 +50,9 @@
|
||||
|
||||
/* See: edit_curve_point_vert.glsl for duplicate includes. */
|
||||
#define SELECT 1
|
||||
#define ACTIVE_NURB 1 << 2
|
||||
#define BEZIER_HANDLE 1 << 3
|
||||
#define EVEN_U_BIT 1 << 4 /* Alternate this bit for every U vert. */
|
||||
#define ACTIVE_NURB (1 << 2)
|
||||
#define BEZIER_HANDLE (1 << 3)
|
||||
#define EVEN_U_BIT (1 << 4) /* Alternate this bit for every U vert. */
|
||||
#define COLOR_SHIFT 5
|
||||
|
||||
/* Used as values of `color_id` in `edit_curve_overlay_handle_geom.glsl` */
|
||||
|
@@ -44,7 +44,7 @@
|
||||
#include "draw_cache.h"
|
||||
#include "draw_cache_impl.h"
|
||||
|
||||
#define BEZIER_HANDLE 1 << 3
|
||||
#define BEZIER_HANDLE (1 << 3)
|
||||
#define COLOR_SHIFT 5
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@@ -24,7 +24,7 @@
|
||||
#pragma once
|
||||
|
||||
#define MAX_LAYER_NAME_CT 4 /* u0123456789, u, au, a0123456789 */
|
||||
#define MAX_LAYER_NAME_LEN GPU_MAX_SAFE_ATTR_NAME + 2
|
||||
#define MAX_LAYER_NAME_LEN (GPU_MAX_SAFE_ATTR_NAME + 2)
|
||||
#define MAX_THICKRES 2 /* see eHairType */
|
||||
#define MAX_HAIR_SUBDIV 4 /* see hair_subdiv rna */
|
||||
|
||||
|
@@ -73,7 +73,7 @@ enum {
|
||||
/* for the callbacks: */
|
||||
#ifndef WITH_PYTHON_MODULE
|
||||
# define BLEND_VERSION_FMT "Blender %d.%02d.%d"
|
||||
# define BLEND_VERSION_ARG BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_VERSION_PATCH
|
||||
# define BLEND_VERSION_ARG (BLENDER_VERSION / 100), (BLENDER_VERSION % 100), BLENDER_VERSION_PATCH
|
||||
#endif
|
||||
|
||||
#ifdef WITH_BUILDINFO_HEADER
|
||||
|
Reference in New Issue
Block a user