From cdc81a5d68e0c6e2aa64469962afda75ed303ad7 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 20 Jan 2013 15:54:36 +0100 Subject: [PATCH 1/1] Move reactMethodInReactions initialization outside of check method Methods should do what their name suggests. Mathod called check... should not do more than checking something. --- src/visualizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2