diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-05-24 18:23:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-05-24 18:23:54 +0300 |
commit | 55c15ad9ded2707d16cb88eea2dc2a62e4ec2359 (patch) | |
tree | 9f4c1bf3392e5b69b84d5214f7f1b9b8d875222b /intern/cycles/kernel/kernel_compat_cpu.h | |
parent | 3de9db96508309646d2d715eee483ca5ff909b87 (diff) |
Cycles: Use falltrhough attribute to help catching missing break statements
Diffstat (limited to 'intern/cycles/kernel/kernel_compat_cpu.h')
-rw-r--r-- | intern/cycles/kernel/kernel_compat_cpu.h | 12 |
1 files changed, 6 insertions, 6 deletions
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<typename T> 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<typename T> 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<typename T> 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<typename T> 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<typename T> 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<typename T> 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); |