From: Michal Sojka Date: Sun, 20 Jan 2013 14:54:36 +0000 (+0100) Subject: Move reactMethodInReactions initialization outside of check method X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/commitdiff_plain/cdc81a5d68e0c6e2aa64469962afda75ed303ad7?hp=29022e39750d8523f653122e7b5abd3cb87cecda Move reactMethodInReactions initialization outside of check method Methods should do what their name suggests. Mathod called check... should not do more than checking something. --- diff --git a/src/visualizer.cpp b/src/visualizer.cpp index bc83530..8bbdc55 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -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