From 55c15ad9ded2707d16cb88eea2dc2a62e4ec2359 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 24 May 2017 17:23:54 +0200 Subject: Cycles: Use falltrhough attribute to help catching missing break statements --- intern/cycles/kernel/kernel_compat_cpu.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'intern/cycles/kernel/kernel_compat_cpu.h') diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index 21da180bb8e..93934ee6b38 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -195,7 +195,7 @@ template struct texture_image { if(x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: ix = wrap_clamp(ix, width); iy = wrap_clamp(iy, height); @@ -222,7 +222,7 @@ template struct texture_image { if(x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: nix = wrap_clamp(ix+1, width); niy = wrap_clamp(iy+1, height); @@ -265,7 +265,7 @@ template struct texture_image { if(x < 0.0f || y < 0.0f || x > 1.0f || y > 1.0f) { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: pix = wrap_clamp(ix-1, width); piy = wrap_clamp(iy-1, height); @@ -335,7 +335,7 @@ template struct texture_image { { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: ix = wrap_clamp(ix, width); iy = wrap_clamp(iy, height); @@ -374,7 +374,7 @@ template struct texture_image { { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: nix = wrap_clamp(ix+1, width); niy = wrap_clamp(iy+1, height); @@ -449,7 +449,7 @@ template struct texture_image { { return make_float4(0.0f, 0.0f, 0.0f, 0.0f); } - /* Fall through. */ + ATTR_FALLTHROUGH; case EXTENSION_EXTEND: pix = wrap_clamp(ix-1, width); piy = wrap_clamp(iy-1, height); -- cgit v1.2.3