[Mesa-dev] [PATCH] glsl: Fix g++ initializer order warning
Brian Paul
brianp at vmware.com
Mon May 22 12:55:10 UTC 2017
Fixes this warning:
In file included from ../../../src/compiler/glsl/ir.cpp:25:0:
../../../src/compiler/glsl/ir.h: In constructor 'ir_swizzle::ir_swizzle(ir_rvalue*, ir_swizzle_mask)':
../../../src/compiler/glsl/ir.h:1955:20: warning: 'ir_swizzle::mask' will be initialized after [-Wreorder]
ir_swizzle_mask mask;
^
../../../src/compiler/glsl/ir.h:1954:15: warning: 'ir_rvalue* ir_swizzle::val' [-Wreorder]
ir_rvalue *val;
^
../../../src/compiler/glsl/ir.cpp:1592:1: warning: when initialized here [-Wreorder]
ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
^
---
src/compiler/glsl/ir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 2d0c4c0..78889bd 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -1590,7 +1590,7 @@ ir_swizzle::ir_swizzle(ir_rvalue *val, const unsigned *comp,
}
ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
- : ir_rvalue(ir_type_swizzle), mask(mask), val(val)
+ : ir_rvalue(ir_type_swizzle), val(val), mask(mask)
{
this->type = glsl_type::get_instance(val->type->base_type,
mask.num_components, 1);
--
1.9.1
More information about the mesa-dev
mailing list