[Bf-blender-cvs] [ad3378215c0] master: Cleanup: Clang tidy

Hans Goudey noreply at git.blender.org
Thu Apr 14 00:51:32 CEST 2022


Commit: ad3378215c0465898fde26270985ab2487d9b3ca
Author: Hans Goudey
Date:   Wed Apr 13 17:51:20 2022 -0500
Branches: master
https://developer.blender.org/rBad3378215c0465898fde26270985ab2487d9b3ca

Cleanup: Clang tidy

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

M	source/blender/editors/curves/intern/curves_ops.cc
M	source/blender/editors/render/render_shading.cc
M	source/blender/python/gpu/gpu_py_shader_create_info.cc

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

diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc
index 3a4dcd4f5f6..9823a1f18ce 100644
--- a/source/blender/editors/curves/intern/curves_ops.cc
+++ b/source/blender/editors/curves/intern/curves_ops.cc
@@ -473,7 +473,7 @@ static void CURVES_OT_snap_curves_to_surface(wmOperatorType *ot)
        "Deform",
        "Re-attach curves to a deformed surface using the existing attachment information. This "
        "only works when the topology of the surface mesh has not changed"},
-      {0, NULL, 0, NULL, NULL},
+      {0, nullptr, 0, nullptr, nullptr},
   };
 
   RNA_def_enum(ot->srna,
diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc
index 46f62354fce..da2290f7372 100644
--- a/source/blender/editors/render/render_shading.cc
+++ b/source/blender/editors/render/render_shading.cc
@@ -1167,7 +1167,7 @@ void SCENE_OT_view_layer_add_lightgroup(wmOperatorType *ot)
   ot->prop = RNA_def_string(ot->srna,
                             "name",
                             nullptr,
-                            sizeof(((ViewLayerLightgroup *)NULL)->name),
+                            sizeof(((ViewLayerLightgroup *)nullptr)->name),
                             "Name",
                             "Name of newly created lightgroup");
 }
diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc
index 10824b09d70..ab2bdf33b26 100644
--- a/source/blender/python/gpu/gpu_py_shader_create_info.cc
+++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc
@@ -321,7 +321,7 @@ static PyObject *pygpu_interface_info__tp_new(PyTypeObject *UNUSED(type),
   StageInterfaceInfo *interface = new StageInterfaceInfo(name, "");
   GPUStageInterfaceInfo *interface_info = reinterpret_cast<GPUStageInterfaceInfo *>(interface);
 
-  auto self = BPyGPUStageInterfaceInfo_CreatePyObject(interface_info);
+  auto *self = BPyGPUStageInterfaceInfo_CreatePyObject(interface_info);
 
 #ifdef USE_GPU_PY_REFERENCES
   PyObject *py_name = PyTuple_GET_ITEM(args, 0);
@@ -483,7 +483,7 @@ static PyObject *pygpu_shader_info_fragment_out(BPyGPUShaderCreateInfo *self,
   struct PyC_StringEnum blend_type = {pygpu_dualblend_items, (int)DualBlend::NONE};
 
   static const char *_keywords[] = {"slot", "type", "name", "blend", nullptr};
-  static _PyArg_Parser _parser = {"iO&s|$O&:fragment_out", _keywords, 0};
+  static _PyArg_Parser _parser = {"iO&s|$O&:fragment_out", _keywords, nullptr};
   if (!_PyArg_ParseTupleAndKeywordsFast(args,
                                         kwds,
                                         &_parser,
@@ -733,7 +733,7 @@ static PyObject *pygpu_shader_info_push_constant(BPyGPUShaderCreateInfo *self,
   int array_size = 0;
 
   static const char *_keywords[] = {"type", "name", "size", nullptr};
-  static _PyArg_Parser _parser = {"O&s|I:push_constant", _keywords, 0};
+  static _PyArg_Parser _parser = {"O&s|I:push_constant", _keywords, nullptr};
   if (!_PyArg_ParseTupleAndKeywordsFast(
           args, kwds, &_parser, PyC_ParseStringEnum, &pygpu_type, &name, &array_size)) {
     return nullptr;



More information about the Bf-blender-cvs mailing list