From 12dc84336723d3f156195a6a0473ed151cfb8395 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 22 May 2017 06:52:45 -0600 Subject: glsl: Fix g++ initializer order warning 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) ^ Reviewed-by: Matt Turner --- src/compiler/glsl/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 2d0c4c051ab..78889bd6d3f 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); -- cgit v1.2.3