]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.h
Don't return references from apply functions
[libs/gl.git] / source / glsl / optimize.h
index 7b90a2cd676b62a7693b3b8ccdedf94ce2888d8a..4113f21465a990e85a4fa701351b8277cec09cfe 100644 (file)
@@ -39,7 +39,7 @@ private:
 public:
        InlineableFunctionLocator();
 
-       const std::set<FunctionDeclaration *> &apply(Stage &s) { s.content.visit(*this); return inlineable; }
+       std::set<FunctionDeclaration *> apply(Stage &s) { s.content.visit(*this); return inlineable; }
 
 private:
        virtual void visit(FunctionCall &);
@@ -57,7 +57,6 @@ class InlineContentInjector: private TraversingVisitor
 private:
        enum Pass
        {
-               DEPENDS,
                REFERENCED,
                INLINE,
                RENAME
@@ -74,7 +73,7 @@ private:
 public:
        InlineContentInjector();
 
-       const std::string &apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
+       std::string apply(Stage &, FunctionDeclaration &, Block &, const NodeList<Statement>::iterator &, FunctionCall &);
 
 private:
        virtual void visit(VariableReference &);