Cleanup: clarify #ifndef checks in trailing #endif comments
This commit is contained in:
@@ -1265,4 +1265,4 @@ void MEM_guarded_name_ptr_set(void *vmemh, const char *str)
|
||||
MEMNEXT(memh->prev)->nextname = str;
|
||||
}
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -440,4 +440,4 @@ const char *MEM_lockfree_name_ptr(void *vmemh)
|
||||
}
|
||||
|
||||
void MEM_lockfree_name_ptr_set(void *UNUSED(vmemh), const char *UNUSED(str)) {}
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -757,7 +757,7 @@ size_t CustomData_get_elem_size(const CustomDataLayer *layer);
|
||||
struct DynStr;
|
||||
/** Use to inspect mesh data when debugging. */
|
||||
void CustomData_debug_info_from_layers(const CustomData *data, const char *indent, DynStr *dynstr);
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
namespace blender::bke {
|
||||
const CPPType *custom_data_type_to_cpp_type(eCustomDataType type);
|
||||
|
||||
@@ -81,4 +81,4 @@ void BKE_mesh_runtime_eval_to_meshkey(Mesh *me_deformed, Mesh *me, KeyBlock *kb)
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool BKE_mesh_runtime_is_valid(Mesh *me_eval);
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -84,7 +84,7 @@ static bool is_appdir_init = false;
|
||||
# define ASSERT_IS_INIT() BLI_assert(is_appdir_init)
|
||||
#else
|
||||
# define ASSERT_IS_INIT() ((void)0)
|
||||
#endif
|
||||
#endif /* NDEBUG */
|
||||
|
||||
void BKE_appdir_init()
|
||||
{
|
||||
|
||||
@@ -5273,7 +5273,7 @@ void CustomData_debug_info_from_layers(const CustomData *data, const char *inden
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
@@ -963,7 +963,7 @@ static void vnormal(PROCESS *process, const float point[3], float r_no[3])
|
||||
r_no[1] = metaball(process, point[0], point[1] + delta, point[2]) - f;
|
||||
r_no[2] = metaball(process, point[0], point[1], point[2] + delta) - f;
|
||||
}
|
||||
#endif /* USE_ACCUM_NORMAL */
|
||||
#endif /* !USE_ACCUM_NORMAL */
|
||||
|
||||
/**
|
||||
* \return the id of vertex between two corners.
|
||||
|
||||
@@ -82,4 +82,4 @@ void BKE_mesh_debug_print(const Mesh *me)
|
||||
MEM_freeN(str);
|
||||
}
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -650,7 +650,7 @@ static bool check_matching_legacy_layer_counts(CustomData *fdata_legacy,
|
||||
* then there was nothing to do... */
|
||||
return a_num ? true : fallback;
|
||||
}
|
||||
#endif
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
static void add_mface_layers(Mesh &mesh, CustomData *fdata_legacy, CustomData *ldata, int total)
|
||||
{
|
||||
|
||||
@@ -473,6 +473,6 @@ bool BKE_mesh_runtime_is_valid(Mesh *me_eval)
|
||||
return is_valid;
|
||||
}
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -67,7 +67,7 @@ struct rbCollisionShape;
|
||||
struct rbConstraint;
|
||||
struct rbDynamicsWorld;
|
||||
struct rbRigidBody;
|
||||
#endif
|
||||
#endif /* !WITH_BULLET */
|
||||
|
||||
/* ************************************** */
|
||||
/* Memory Management */
|
||||
|
||||
@@ -2370,7 +2370,7 @@ int text_check_identifier_nodigit_unicode(const uint ch)
|
||||
{
|
||||
return (ch < 255 && text_check_identifier_nodigit(char(ch)));
|
||||
}
|
||||
#endif /* WITH_PYTHON */
|
||||
#endif /* !WITH_PYTHON */
|
||||
|
||||
bool text_check_whitespace(const char ch)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace enumerable_thread_specific_utils {
|
||||
inline std::atomic<int> next_id = 0;
|
||||
inline thread_local int thread_id = next_id.fetch_add(1, std::memory_order_relaxed);
|
||||
} // namespace enumerable_thread_specific_utils
|
||||
#endif
|
||||
#endif /* !WITH_TBB */
|
||||
|
||||
/**
|
||||
* This is mainly a wrapper for `tbb::enumerable_thread_specific`. The wrapper is needed because we
|
||||
|
||||
@@ -489,7 +489,7 @@ MINLINE void premul_float_to_straight_uchar(unsigned char *result, const float c
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __MATH_COLOR_INLINE_C__ */
|
||||
#endif /* !__MATH_COLOR_INLINE_C__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ static void pf_coord_remove(PolyFill *pf, PolyIndex *pi)
|
||||
if (pf->kdtree.node_num) {
|
||||
kdtree2d_node_remove(&pf->kdtree, pi->index);
|
||||
}
|
||||
#endif
|
||||
#endif /* USE_KDTREE */
|
||||
|
||||
pi->next->prev = pi->prev;
|
||||
pi->prev->next = pi->next;
|
||||
@@ -466,7 +466,7 @@ static void pf_coord_remove(PolyFill *pf, PolyIndex *pi)
|
||||
#ifndef NDEBUG
|
||||
pi->index = (uint32_t)-1;
|
||||
pi->next = pi->prev = NULL;
|
||||
#endif
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
pf->coords_num -= 1;
|
||||
}
|
||||
|
||||
@@ -709,7 +709,7 @@ int bmesh_elem_check(void *element, const char htype)
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
/**
|
||||
* low level function, only frees the vert,
|
||||
|
||||
@@ -71,4 +71,4 @@ void BM_mesh_debug_print(BMesh *bm)
|
||||
MEM_freeN(str);
|
||||
}
|
||||
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
#ifndef NDEBUG
|
||||
char *BM_mesh_debug_info(BMesh *bm) ATTR_NONNULL(1) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
|
||||
void BM_mesh_debug_print(BMesh *bm) ATTR_NONNULL(1);
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
@@ -301,7 +301,7 @@ float light_contact_shadows(LightData ld, vec3 P, vec3 vP, vec3 vNg, float rand_
|
||||
}
|
||||
return 1.0;
|
||||
}
|
||||
#endif /* VOLUMETRICS */
|
||||
#endif /* !VOLUMETRICS */
|
||||
|
||||
float light_visibility(LightData ld, vec3 P, vec4 l_vector)
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ static void drw_state_ensure_not_reused(DRWManager *dst)
|
||||
{
|
||||
memset(dst, 0xff, offsetof(DRWManager, system_gpu_context));
|
||||
}
|
||||
#endif
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
static bool drw_draw_show_annotation()
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ vec4 pack_line_data(vec2 frag_co, vec2 edge_start, vec2 edge_pos)
|
||||
/* Temporary until we fully make the switch. */
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
uniform int drw_resourceChunk;
|
||||
#endif /* USE_GPU_SHADER_CREATE_INFO */
|
||||
#endif /* !USE_GPU_SHADER_CREATE_INFO */
|
||||
|
||||
#ifdef GPU_VERTEX_SHADER
|
||||
|
||||
@@ -176,7 +176,7 @@ struct ObjectMatrices {
|
||||
mat4 model;
|
||||
mat4 model_inverse;
|
||||
};
|
||||
# endif /* DRW_SHADER_SHARED_H */
|
||||
# endif /* !DRW_SHADER_SHARED_H */
|
||||
|
||||
# ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
layout(std140) uniform modelBlock
|
||||
@@ -198,7 +198,7 @@ layout(std140) uniform modelBlock
|
||||
* and older AMD driver on windows. */
|
||||
uniform mat4 ModelMatrix;
|
||||
uniform mat4 ModelMatrixInverse;
|
||||
# endif /* USE_GPU_SHADER_CREATE_INFO */
|
||||
# endif /* !USE_GPU_SHADER_CREATE_INFO */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -237,9 +237,9 @@ static void update_pyconstraint_cb(void *arg1, void *arg2)
|
||||
if (owner && con) {
|
||||
BPY_pyconstraint_update(owner, con);
|
||||
}
|
||||
# endif
|
||||
# endif /* WITH_PYTHON */
|
||||
}
|
||||
#endif /* UNUSED */
|
||||
#endif /* UNUSED */
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void ED_scene_fps_average_clear(Scene *scene)
|
||||
times_fps_sum_cmp += fpsi->times_fps[i].value;
|
||||
}
|
||||
BLI_assert(fpsi->times_fps_sum == times_fps_sum_cmp);
|
||||
#endif
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
MEM_freeN(scene->fps_info);
|
||||
scene->fps_info = nullptr;
|
||||
|
||||
@@ -878,7 +878,7 @@ static int text_run_script_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
#else
|
||||
return text_run_script(C, op->reports);
|
||||
#endif
|
||||
#endif /* WITH_PYTHON */
|
||||
}
|
||||
|
||||
void TEXT_OT_run_script(wmOperatorType *ot)
|
||||
|
||||
@@ -738,4 +738,4 @@ void immThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset)
|
||||
immUniformColor4ub(col[0], col[1], col[2], col[3]);
|
||||
}
|
||||
|
||||
#endif /* GPU_STANDALONE */
|
||||
#endif /* !GPU_STANDALONE */
|
||||
|
||||
@@ -221,7 +221,7 @@ float average(vec2 a);
|
||||
float average(vec3 a);
|
||||
float average(vec4 a);
|
||||
|
||||
# endif /* GPU_METAL */
|
||||
# endif /* !GPU_METAL */
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/** \name Implementation
|
||||
@@ -240,7 +240,7 @@ bool is_zero(vec4 vec)
|
||||
{
|
||||
return all(equal(vec, vec4(0.0)));
|
||||
}
|
||||
# endif
|
||||
# endif /* GPU_METAL */
|
||||
|
||||
bool is_any_zero(vec2 vec)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ void BLI_system_backtrace(FILE *fp)
|
||||
{
|
||||
(void)fp;
|
||||
}
|
||||
#endif
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
/* Replace if different */
|
||||
#define TMP_EXT ".tmp"
|
||||
|
||||
@@ -85,7 +85,7 @@ static void print_default_info(const PropertyDefRNA *dp)
|
||||
dp->dnaname,
|
||||
dp->prop->identifier);
|
||||
}
|
||||
#endif /* RNA_RUNTIME */
|
||||
#endif /* !RNA_RUNTIME */
|
||||
|
||||
/* Duplicated code since we can't link in blenkernel or blenlib */
|
||||
|
||||
|
||||
@@ -576,11 +576,7 @@ static const EnumPropertyItem node_cryptomatte_layer_name_items[] = {
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef RNA_RUNTIME
|
||||
|
||||
#endif
|
||||
#endif /* !RNA_RUNTIME */
|
||||
|
||||
#undef ITEM_ATTRIBUTE
|
||||
#undef ITEM_FLOAT
|
||||
|
||||
@@ -1344,7 +1344,7 @@ void RNA_api_object(StructRNA *srna)
|
||||
RNA_def_parameter_flags(
|
||||
parm, PROP_THICK_WRAP, ParameterFlag(0)); /* needed for string return value */
|
||||
RNA_def_function_output(func, parm);
|
||||
# endif /* NDEBUG */
|
||||
# endif /* !NDEBUG */
|
||||
|
||||
func = RNA_def_function(srna, "update_from_editmode", "rna_Object_update_from_editmode");
|
||||
RNA_def_function_ui_description(func, "Load the objects edit-mode data into the object data");
|
||||
|
||||
@@ -8855,7 +8855,7 @@ void pyrna_alloc_types()
|
||||
RNA_PROP_END;
|
||||
|
||||
PyGILState_Release(gilstate);
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
}
|
||||
|
||||
void pyrna_free_types()
|
||||
|
||||
@@ -715,7 +715,7 @@ static bool BaseMathObject_is_tracked(BaseMathObject *self)
|
||||
self->cb_user = cb_user;
|
||||
return is_tracked;
|
||||
}
|
||||
#endif /* NDEBUG */
|
||||
#endif /* !NDEBUG */
|
||||
|
||||
void BaseMathObject_dealloc(BaseMathObject *self)
|
||||
{
|
||||
|
||||
@@ -209,7 +209,7 @@ static PyObject *Color_from_rec709_linear_to_scene_linear(ColorObject *self)
|
||||
return Color_CreatePyObject(col, Py_TYPE(self));
|
||||
}
|
||||
|
||||
#endif /* MATH_STANDALONE */
|
||||
#endif /* !MATH_STANDALONE */
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -1115,7 +1115,7 @@ static PyMethodDef Color_methods[] = {
|
||||
(PyCFunction)Color_from_rec709_linear_to_scene_linear,
|
||||
METH_NOARGS,
|
||||
Color_from_rec709_linear_to_scene_linear_doc},
|
||||
#endif /* MATH_STANDALONE */
|
||||
#endif /* !MATH_STANDALONE */
|
||||
|
||||
{nullptr, nullptr, 0, nullptr},
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
# include "BLI_convexhull_2d.h"
|
||||
# include "BLI_delaunay_2d.h"
|
||||
# include "MEM_guardedalloc.h"
|
||||
#endif
|
||||
#endif /* !MATH_STANDALONE */
|
||||
|
||||
#include "BLI_math_geom.h"
|
||||
#include "BLI_math_vector.h"
|
||||
|
||||
@@ -78,7 +78,7 @@ static PyObject *M_Interpolate_poly_3d_calc(PyObject * /*self*/, PyObject *args)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* MATH_STANDALONE */
|
||||
#endif /* !MATH_STANDALONE */
|
||||
|
||||
static PyMethodDef M_Interpolate_methods[] = {
|
||||
#ifndef MATH_STANDALONE
|
||||
|
||||
@@ -127,7 +127,7 @@ static void wm_block_splash_image_roundcorners_add(ImBuf *ibuf)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* WITH_HEADLESS */
|
||||
#endif /* !WITH_HEADLESS */
|
||||
|
||||
static ImBuf *wm_block_splash_image(int width, int *r_height)
|
||||
{
|
||||
@@ -304,7 +304,7 @@ static uiBlock *wm_block_create_about(bContext *C, ARegion *region, void * /*arg
|
||||
row = uiLayoutRow(layout, false);
|
||||
uiItemS_ex(row, 2.7f);
|
||||
}
|
||||
#endif /* WITH_HEADLESS */
|
||||
#endif /* !WITH_HEADLESS */
|
||||
|
||||
uiLayout *col = uiLayoutColumn(layout, true);
|
||||
|
||||
|
||||
@@ -2537,4 +2537,4 @@ void main_args_setup(bContext *C, bArgs *ba, bool all)
|
||||
|
||||
/** \} */
|
||||
|
||||
#endif /* WITH_PYTHON_MODULE */
|
||||
#endif /* !WITH_PYTHON_MODULE */
|
||||
|
||||
@@ -39,7 +39,7 @@ void main_signal_setup(void);
|
||||
void main_signal_setup_background(void);
|
||||
void main_signal_setup_fpe(void);
|
||||
|
||||
#endif /* WITH_PYTHON_MODULE */
|
||||
#endif /* !WITH_PYTHON_MODULE */
|
||||
|
||||
/** Shared data for argument handlers to store state in. */
|
||||
struct ApplicationState {
|
||||
|
||||
Reference in New Issue
Block a user