]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.cpp
Use default member initializers for simple types
[libs/gl.git] / source / glsl / optimize.cpp
index a24d85dd5f0b7f025e01ab7b13dca85238b09535..8c586e7ad886cf433c4c5cadf6315783980804a6 100644 (file)
@@ -11,10 +11,6 @@ namespace Msp {
 namespace GL {
 namespace SL {
 
-ConstantSpecializer::ConstantSpecializer():
-       values(0)
-{ }
-
 void ConstantSpecializer::apply(Stage &stage, const map<string, int> &v)
 {
        values = &v;
@@ -59,11 +55,6 @@ void ConstantSpecializer::visit(VariableDeclaration &var)
 }
 
 
-InlineableFunctionLocator::InlineableFunctionLocator():
-       current_function(0),
-       return_count(0)
-{ }
-
 void InlineableFunctionLocator::visit(FunctionCall &call)
 {
        FunctionDeclaration *def = call.declaration;
@@ -118,11 +109,6 @@ void InlineableFunctionLocator::visit(Return &ret)
 }
 
 
-InlineContentInjector::InlineContentInjector():
-       source_func(0),
-       pass(REFERENCED)
-{ }
-
 string InlineContentInjector::apply(Stage &stage, FunctionDeclaration &target_func, Block &tgt_blk, const NodeList<Statement>::iterator &ins_pt, FunctionCall &call)
 {
        source_func = call.declaration->definition;
@@ -257,12 +243,6 @@ void InlineContentInjector::visit(Return &ret)
 }
 
 
-FunctionInliner::FunctionInliner():
-       current_function(0),
-       r_any_inlined(false),
-       r_inlined_here(false)
-{ }
-
 bool FunctionInliner::apply(Stage &s)
 {
        stage = &s;
@@ -348,16 +328,6 @@ void FunctionInliner::visit(Iteration &iter)
 }
 
 
-ExpressionInliner::ExpressionInliner():
-       r_ref_info(0),
-       r_trivial(false),
-       access_read(true),
-       access_write(false),
-       iteration_init(false),
-       iteration_body(0),
-       r_oper(0)
-{ }
-
 bool ExpressionInliner::apply(Stage &s)
 {
        s.content.visit(*this);
@@ -983,10 +953,6 @@ void ConstantConditionEliminator::visit(Iteration &iter)
 }
 
 
-UnreachableCodeRemover::UnreachableCodeRemover():
-       reachable(true)
-{ }
-
 bool UnreachableCodeRemover::apply(Stage &stage)
 {
        stage.content.visit(*this);
@@ -1080,17 +1046,6 @@ void UnusedTypeRemover::visit(FunctionDeclaration &func)
 }
 
 
-UnusedVariableRemover::UnusedVariableRemover():
-       stage(0),
-       interface_block(0),
-       r_assignment(0),
-       assignment_target(false),
-       r_side_effects(false),
-       in_struct(false),
-       composite_reference(false),
-       in_loop(0)
-{ }
-
 bool UnusedVariableRemover::apply(Stage &s)
 {
        stage = &s;