Cleanup: Clang tidy

This commit is contained in:
Hans Goudey
2022-01-03 13:52:39 -06:00
parent 4e44cfa3d9
commit 675d3cdd69
6 changed files with 7 additions and 7 deletions

View File

@@ -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;
};
/**

View File

@@ -684,7 +684,7 @@ const CPPType &FieldConstant::type() const
return type_;
}
const GPointer FieldConstant::value() const
GPointer FieldConstant::value() const
{
return {type_, value_};
}

View File

@@ -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_);

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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;