diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-07-03 17:32:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-07-03 17:32:51 +0300 |
commit | f891d4e2adae2dcf35497ba95a9cfb74affead0c (patch) | |
tree | fddb5cad92ddbe5b22323ee0b011f1f95682c716 /source/blender/freestyle/intern/python/UnaryFunction0D | |
parent | 53d41e1a6fc4c521e412fba57913f93fadeb3735 (diff) |
Clang-Tidy: Fix readability-delete-null-pointer warnings
Also enable it in the configuration.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D')
10 files changed, 10 insertions, 30 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index d1ea13c90a7..9ced91f6867 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -145,9 +145,7 @@ static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble *self, static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble *self) { - if (self->uf0D_double) { - delete self->uf0D_double; - } + delete self->uf0D_double; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 00600c405ef..7520f647276 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -83,9 +83,7 @@ static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature *sel static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature *self) { - if (self->uf0D_edgenature) { - delete self->uf0D_edgenature; - } + delete self->uf0D_edgenature; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 3961bf58bc4..7ee0d9bd71d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -121,9 +121,7 @@ static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat *self, static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat *self) { - if (self->uf0D_float) { - delete self->uf0D_float; - } + delete self->uf0D_float; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 86e902bafe4..9c0f833d8fa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -80,9 +80,7 @@ static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId *self, PyObject *arg static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId *self) { - if (self->uf0D_id) { - delete self->uf0D_id; - } + delete self->uf0D_id; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index 551429add8b..95cdc1522ac 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -82,9 +82,7 @@ static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial *self, static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial *self) { - if (self->uf0D_material) { - delete self->uf0D_material; - } + delete self->uf0D_material; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 8721e820fee..17ddd9773d2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -83,9 +83,7 @@ static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned *self, static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned *self) { - if (self->uf0D_unsigned) { - delete self->uf0D_unsigned; - } + delete self->uf0D_unsigned; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 44a39af68dd..3ff73dca832 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -89,9 +89,7 @@ static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f *self, static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f *self) { - if (self->uf0D_vec2f) { - delete self->uf0D_vec2f; - } + delete self->uf0D_vec2f; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index 6a27fc6e140..afbd25df122 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -82,9 +82,7 @@ static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f *self, static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f *self) { - if (self->uf0D_vec3f) { - delete self->uf0D_vec3f; - } + delete self->uf0D_vec3f; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 88c050e243e..4fd6d949974 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -84,9 +84,7 @@ static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorView static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape *self) { - if (self->uf0D_vectorviewshape) { - delete self->uf0D_vectorviewshape; - } + delete self->uf0D_vectorviewshape; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 11f4e114342..0f623b0e765 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -90,9 +90,7 @@ static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape *self, static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape *self) { - if (self->uf0D_viewshape) { - delete self->uf0D_viewshape; - } + delete self->uf0D_viewshape; UnaryFunction0D_Type.tp_dealloc((PyObject *)self); } |