X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=71e5c39a948aabc7db12e701a80bcca32cfef3dc;hp=85d805d1b67aeea72ee41bcec1855222732dc5ef;hb=cc3f4aaaf8d2b34347f69b026c10f82797059aa4;hpb=50a79aee4c53c4198bae38c7ff447133a043aacc diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index 85d805d1..71e5c39a 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -186,14 +186,12 @@ void BinaryExpression::visit(NodeVisitor &visitor) Assignment::Assignment(): - self_referencing(false), - target_declaration(0) + self_referencing(false) { } Assignment::Assignment(const Assignment &other): BinaryExpression(other), - self_referencing(other.self_referencing), - target_declaration(0) + self_referencing(other.self_referencing) { } void Assignment::visit(NodeVisitor &visitor) @@ -202,6 +200,24 @@ void Assignment::visit(NodeVisitor &visitor) } +Assignment::Target::Target(Statement *d): + declaration(d), + chain_len(0) +{ + fill(chain, chain+7, 0); +} + +bool Assignment::Target::operator<(const Target &other) const +{ + if(declaration!=other.declaration) + return declaration