[Bf-blender-cvs] [73f4dfa3c5f] master: Cleanup: Clang tidy else after return

Hans Goudey noreply at git.blender.org
Thu Feb 18 20:59:14 CET 2021


Commit: 73f4dfa3c5fd2714ed2fff528588d0826995449e
Author: Hans Goudey
Date:   Thu Feb 18 13:58:27 2021 -0600
Branches: master
https://developer.blender.org/rB73f4dfa3c5fd2714ed2fff528588d0826995449e

Cleanup: Clang tidy else after return

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

M	source/blender/python/gpu/gpu_py_buffer.c
M	source/blender/python/gpu/gpu_py_framebuffer.c

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

diff --git a/source/blender/python/gpu/gpu_py_buffer.c b/source/blender/python/gpu/gpu_py_buffer.c
index 115f7ba923f..b89d2c6a69f 100644
--- a/source/blender/python/gpu/gpu_py_buffer.c
+++ b/source/blender/python/gpu/gpu_py_buffer.c
@@ -330,9 +330,7 @@ static PyObject *pygpu_buffer__tp_new(PyTypeObject *UNUSED(type), PyObject *args
         Py_DECREF(ob);
         return NULL;
       }
-      else {
-        shape[i] = PyLong_AsLong(ob);
-      }
+      shape[i] = PyLong_AsLong(ob);
       Py_DECREF(ob);
 
       if (shape[i] < 1) {
diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c
index 487f0f984cb..04d49a9f15d 100644
--- a/source/blender/python/gpu/gpu_py_framebuffer.c
+++ b/source/blender/python/gpu/gpu_py_framebuffer.c
@@ -300,7 +300,7 @@ static PyObject *pygpu_framebuffer__tp_new(PyTypeObject *UNUSED(self),
   if (!pygpu_framebuffer_new_parse_arg(depth_attachment, &config[0])) {
     return NULL;
   }
-  else if (config[0].tex && !GPU_texture_depth(config[0].tex)) {
+  if (config[0].tex && !GPU_texture_depth(config[0].tex)) {
     PyErr_SetString(PyExc_ValueError, "Depth texture with incompatible format");
     return NULL;
   }



More information about the Bf-blender-cvs mailing list