diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2012-12-11 12:56:03 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-01-25 09:07:32 -0500 |
commit | ecfb404e8d4fcd35524d1c4b3421e24980fe3976 (patch) | |
tree | bd11671d87c067bcee346c923cef574e7177ec21 /src/glsl/ir_clone.cpp | |
parent | 416326e33780fda0580292f9c2ace0b7c2c520e3 (diff) | |
download | external_mesa3d-ecfb404e8d4fcd35524d1c4b3421e24980fe3976.zip external_mesa3d-ecfb404e8d4fcd35524d1c4b3421e24980fe3976.tar.gz external_mesa3d-ecfb404e8d4fcd35524d1c4b3421e24980fe3976.tar.bz2 |
glsl: Replace most default cases in switches on GLSL type
This makes it easier to find switch-statements that need to be updated
after a new GLSL_TYPE_* is added because the compiler will generate a
warning.
Switch-statements that only had a small number of cases (e.g.,
everything in ir_constant_expression.cpp) were not modified. I may
regret that decision when we eventually add support for doubles.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r-- | src/glsl/ir_clone.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index c62c1fc..9b7981b 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -375,10 +375,14 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const return c; } - default: + case GLSL_TYPE_SAMPLER: + case GLSL_TYPE_VOID: + case GLSL_TYPE_ERROR: assert(!"Should not get here."); - return NULL; + break; } + + return NULL; } |