]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Move reactMethodInReactions initialization outside of check method
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 20 Jan 2013 14:54:36 +0000 (15:54 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 20 Jan 2013 14:54:36 +0000 (15:54 +0100)
Methods should do what their name suggests. Mathod called check... should
not do more than checking something.

src/visualizer.cpp

index bc83530e5d14e44b70685d625e4d3efc04c3150a..8bbdc55595bbd07681f036327163918c1b28db5c 100644 (file)
@@ -328,7 +328,6 @@ public:
            }
            i++;
        }
-       reactMethodInReactions.clear();
     }
     
     bool HandleCustomReaction(const CXXRecordDecl *SrcState, const Type *EventType)
@@ -450,6 +449,7 @@ public:
        int typedef_num = 0;
        string name(RecordDecl->getName()); //getQualifiedNameAsString());
        Diag(RecordDecl->getLocStart(), diag_found_state) << name;
+       reactMethodInReactions.clear();
 
        Model::State *state;
        // Either we saw a reference to forward declared state