From 0f9057390de1ce240cf5b09492077169ebf132c5 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 15 Apr 2022 11:59:02 -0500 Subject: Cleanup: Clang tidy --- source/blender/editors/object/object_transform.cc | 6 +++--- source/blender/editors/sculpt_paint/sculpt_paint_image.cc | 4 +--- source/blender/editors/space_node/node_draw.cc | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc index c0ec6c6678e..976fe683f95 100644 --- a/source/blender/editors/object/object_transform.cc +++ b/source/blender/editors/object/object_transform.cc @@ -597,7 +597,7 @@ static bool apply_objects_internal_can_multiuser(bContext *C) { Object *obact = CTX_data_active_object(C); - if (ELEM(NULL, obact, obact->data)) { + if (ELEM(nullptr, obact, obact->data)) { return false; } @@ -1176,7 +1176,7 @@ void OBJECT_OT_transform_apply(wmOperatorType *ot) static int object_parent_inverse_apply_exec(bContext *C, wmOperator *UNUSED(op)) { CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { - if (ob->parent == NULL) { + if (ob->parent == nullptr) { continue; } @@ -1185,7 +1185,7 @@ static int object_parent_inverse_apply_exec(bContext *C, wmOperator *UNUSED(op)) } CTX_DATA_END; - WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, nullptr); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc index 082ff6260c2..1fc7551f545 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc @@ -38,9 +38,7 @@ struct ImageData { Image *image = nullptr; ImageUser *image_user = nullptr; - ~ImageData() - { - } + ~ImageData() = default; static bool init_active_image(Object *ob, ImageData *r_image_data, diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 692940d405c..47d35ced371 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -1882,7 +1882,7 @@ static void node_draw_extra_info_row(const bNode &node, 0, 0, extra_info_row.tooltip); - if (extra_info_row.tooltip_fn != NULL) { + if (extra_info_row.tooltip_fn != nullptr) { UI_but_func_tooltip_set(but_icon, extra_info_row.tooltip_fn, extra_info_row.tooltip_fn_arg, -- cgit v1.2.3