[Bf-blender-cvs] [675d3cdd699] master: Cleanup: Clang tidy

Hans Goudey noreply at git.blender.org
Mon Jan 3 20:53:26 CET 2022


Commit: 675d3cdd699d8c59cd886bcf5849e25002a69792
Author: Hans Goudey
Date:   Mon Jan 3 13:52:39 2022 -0600
Branches: master
https://developer.blender.org/rB675d3cdd699d8c59cd886bcf5849e25002a69792

Cleanup: Clang tidy

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

M	source/blender/functions/FN_field.hh
M	source/blender/functions/intern/field.cc
M	source/blender/gpu/opengl/gl_shader.cc
M	source/blender/modifiers/intern/MOD_mask.cc
M	source/blender/nodes/shader/nodes/node_shader_fresnel.cc
M	source/blender/nodes/shader/nodes/node_shader_vector_transform.cc

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

diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh
index b8cb05fecab..11f8a7e9b94 100644
--- a/source/blender/functions/FN_field.hh
+++ b/source/blender/functions/FN_field.hh
@@ -287,7 +287,7 @@ class FieldConstant : public FieldNode {
 
   const CPPType &output_cpp_type(int output_index) const override;
   const CPPType &type() const;
-  const GPointer value() const;
+  GPointer value() const;
 };
 
 /**
diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc
index 6a4d46c14f2..d6b83c42294 100644
--- a/source/blender/functions/intern/field.cc
+++ b/source/blender/functions/intern/field.cc
@@ -684,7 +684,7 @@ const CPPType &FieldConstant::type() const
   return type_;
 }
 
-const GPointer FieldConstant::value() const
+GPointer FieldConstant::value() const
 {
   return {type_, value_};
 }
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc
index cd2c3caad46..8367b0de02b 100644
--- a/source/blender/gpu/opengl/gl_shader.cc
+++ b/source/blender/gpu/opengl/gl_shader.cc
@@ -47,7 +47,7 @@ GLShader::GLShader(const char *name) : Shader(name)
 {
 #if 0 /* Would be nice to have, but for now the Deferred compilation \
        * does not have a GPUContext. */
-  BLI_assert(GLContext::get() != NULL);
+  BLI_assert(GLContext::get() != nullptr);
 #endif
   shader_program_ = glCreateProgram();
 
@@ -58,7 +58,7 @@ GLShader::~GLShader()
 {
 #if 0 /* Would be nice to have, but for now the Deferred compilation \
        * does not have a GPUContext. */
-  BLI_assert(GLContext::get() != NULL);
+  BLI_assert(GLContext::get() != nullptr);
 #endif
   /* Invalid handles are silently ignored. */
   glDeleteShader(vert_shader_);
diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc
index f452b0c7091..090c4d5512e 100644
--- a/source/blender/modifiers/intern/MOD_mask.cc
+++ b/source/blender/modifiers/intern/MOD_mask.cc
@@ -702,7 +702,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx)
     Object *armature_ob = mmd->ob_arm;
 
     /* Return input mesh if there is no armature with bones. */
-    if (ELEM(NULL, armature_ob, armature_ob->pose)) {
+    if (ELEM(nullptr, armature_ob, armature_ob->pose)) {
       return mesh;
     }
 
diff --git a/source/blender/nodes/shader/nodes/node_shader_fresnel.cc b/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
index a6317c1adba..0a06cec407b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_fresnel.cc
@@ -71,7 +71,7 @@ void register_node_type_sh_fresnel()
   sh_node_type_base(&ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT, 0);
   node_type_socket_templates(&ntype, file_ns::sh_node_fresnel_in, file_ns::sh_node_fresnel_out);
   node_type_gpu(&ntype, file_ns::node_shader_gpu_fresnel);
-  node_type_exec(&ntype, NULL, NULL, file_ns::node_shader_exec_fresnel);
+  node_type_exec(&ntype, nullptr, nullptr, file_ns::node_shader_exec_fresnel);
 
   nodeRegisterType(&ntype);
 }
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
index fc6a05d93b6..67766900189 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_transform.cc
@@ -100,7 +100,7 @@ static int gpu_shader_vect_transform(GPUMaterial *mat,
 
   const char *vtransform = "direction_transform_m4v3";
   const char *ptransform = "point_transform_m4v3";
-  const char *func_name = 0;
+  const char *func_name = nullptr;
 
   NodeShaderVectTransform *nodeprop = (NodeShaderVectTransform *)node->storage;



More information about the Bf-blender-cvs mailing list