diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 13:39:35 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-07 14:38:06 +0300 |
commit | c889d93c80c52603a501b6b76f6e251b7a6112d2 (patch) | |
tree | e39563837bc237f92b1ad5a9e429b41fe69a6e4c /source/blender/gpu/intern/gpu_framebuffer.cc | |
parent | 326e137a8cfaac6587a83d4c61d2889832926827 (diff) |
Cleanup: GPU, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/gpu` module.
No functional changes.
Diffstat (limited to 'source/blender/gpu/intern/gpu_framebuffer.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_framebuffer.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 056a449ac6d..13df2268221 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -127,9 +127,8 @@ static GPUTexture *framebuffer_get_depth_tex(GPUFrameBuffer *fb) if (fb->attachments[GPU_FB_DEPTH_ATTACHMENT].tex) { return fb->attachments[GPU_FB_DEPTH_ATTACHMENT].tex; } - else { - return fb->attachments[GPU_FB_DEPTH_STENCIL_ATTACHMENT].tex; - } + + return fb->attachments[GPU_FB_DEPTH_STENCIL_ATTACHMENT].tex; } static GPUTexture *framebuffer_get_color_tex(GPUFrameBuffer *fb, int slot) @@ -190,9 +189,8 @@ GPUFrameBuffer *GPU_framebuffer_active_get(void) if (ctx) { return gpu_context_active_framebuffer_get(ctx); } - else { - return 0; - } + + return 0; } static void gpu_framebuffer_current_set(GPUFrameBuffer *fb) @@ -261,7 +259,7 @@ static void gpu_framebuffer_texture_attach_ex( if ((attachment->tex == tex) && (attachment->mip == mip) && (attachment->layer == layer)) { return; /* Exact same texture already bound here. */ } - else if (attachment->tex != NULL) { + if (attachment->tex != NULL) { GPU_framebuffer_texture_detach(fb, attachment->tex); } @@ -414,7 +412,7 @@ static void gpu_framebuffer_update_attachments(GPUFrameBuffer *fb) if (GPU_FB_ATTACHEMENT_IS_DIRTY(fb->dirty_flag, type) == false) { continue; } - else if (fb->attachments[type].tex != NULL) { + if (fb->attachments[type].tex != NULL) { gpu_framebuffer_attachment_attach(&fb->attachments[type], type); fb->multisample = (GPU_texture_samples(fb->attachments[type].tex) > 0); |