From: Mikko Rasa Date: Sat, 3 Apr 2021 20:00:55 +0000 (+0300) Subject: Rearrange some utility struct constructors X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=01c863144c51fd370c75233c5aa5b4add335f4a8;p=libs%2Fgl.git Rearrange some utility struct constructors --- diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index 596d7e20..43f94e8d 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -368,15 +368,6 @@ void FunctionInliner::visit(Iteration &iter) } -ExpressionInliner::ExpressionInfo::ExpressionInfo(): - expression(0), - assign_scope(0), - inline_point(0), - trivial(false), - available(true) -{ } - - ExpressionInliner::ExpressionInliner(): r_ref_info(0), r_any_inlined(false), diff --git a/source/glsl/optimize.h b/source/glsl/optimize.h index 4c57eaea..7b90a2cd 100644 --- a/source/glsl/optimize.h +++ b/source/glsl/optimize.h @@ -125,7 +125,7 @@ private: bool trivial; bool available; - ExpressionInfo(); + ExpressionInfo(): expression(0), assign_scope(0), inline_point(0), trivial(false), available(true) { } }; std::map expressions; diff --git a/source/glsl/resolve.h b/source/glsl/resolve.h index ca9c4f32..bbd2d620 100644 --- a/source/glsl/resolve.h +++ b/source/glsl/resolve.h @@ -105,6 +105,8 @@ private: { BasicTypeDeclaration *type; unsigned component_count; + + ArgumentInfo(): type(0), component_count(0) { } }; Stage *stage; diff --git a/source/glsl/syntax.h b/source/glsl/syntax.h index c8324c87..b4d1b386 100644 --- a/source/glsl/syntax.h +++ b/source/glsl/syntax.h @@ -313,6 +313,8 @@ struct Layout: Node std::string name; bool has_value; int value; + + Qualifier(): has_value(false), value(0) { } }; std::vector qualifiers;