[Bf-blender-cvs] [0f9057390de] master: Cleanup: Clang tidy

Hans Goudey noreply at git.blender.org
Fri Apr 15 18:59:10 CEST 2022


Commit: 0f9057390de1ce240cf5b09492077169ebf132c5
Author: Hans Goudey
Date:   Fri Apr 15 11:59:02 2022 -0500
Branches: master
https://developer.blender.org/rB0f9057390de1ce240cf5b09492077169ebf132c5

Cleanup: Clang tidy

===================================================================

M	source/blender/editors/object/object_transform.cc
M	source/blender/editors/sculpt_paint/sculpt_paint_image.cc
M	source/blender/editors/space_node/node_draw.cc

===================================================================

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,



More information about the Bf-blender-cvs mailing list