From: Michal Sojka Date: Sun, 20 Jan 2013 14:41:34 +0000 (+0100) Subject: Rename reactMethodVector to a more descriptive name reactMethodInReactions X-Git-Url: http://rtime.felk.cvut.cz/gitweb/boost-statechart-viewer.git/commitdiff_plain/29022e39750d8523f653122e7b5abd3cb87cecda Rename reactMethodVector to a more descriptive name reactMethodInReactions --- diff --git a/src/visualizer.cpp b/src/visualizer.cpp index 271cc55..bc83530 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -283,7 +283,7 @@ class Visitor : public RecursiveASTVisitor DiagnosticsEngine &Diags; unsigned diag_unhandled_reaction_type, diag_unhandled_reaction_decl, diag_found_state, diag_found_statemachine, diag_no_history, diag_missing_reaction, diag_warning; - std::vector reactMethodVector; + std::vector reactMethodInReactions; // Indicates whether i-th react method is referenced from typedef reactions. public: bool shouldVisitTemplateInstantiations() const { return true; } @@ -315,20 +315,20 @@ public: IdentifierInfo& II = ASTCtx->Idents.get("react"); for (DeclContext::lookup_const_result ReactRes = SrcState->lookup(DeclarationName(&II)); ReactRes.first != ReactRes.second; ++ReactRes.first) { - if (i(*ReactRes.first); Diag(React->getParamDecl(0)->getLocStart(), diag_warning) - << React->getParamDecl(0)->getType().getAsString() << " missing in typedef"; + << React->getParamDecl(0)->getType().getAsString() << " missing in typedef reactions"; } } else { CXXMethodDecl *React = dyn_cast(*ReactRes.first); Diag(React->getParamDecl(0)->getLocStart(), diag_warning) - << React->getParamDecl(0)->getType().getAsString() << " missing in typedef"; + << React->getParamDecl(0)->getType().getAsString() << " missing in typedef reactions"; } i++; } - reactMethodVector.clear(); + reactMethodInReactions.clear(); } bool HandleCustomReaction(const CXXRecordDecl *SrcState, const Type *EventType) @@ -342,12 +342,12 @@ public: if (React->getNumParams() >= 1) { const ParmVarDecl *p = React->getParamDecl(0); const Type *ParmType = p->getType().getTypePtr(); - if (i == reactMethodVector.size()) reactMethodVector.push_back(false); + if (i == reactMethodInReactions.size()) reactMethodInReactions.push_back(false); if (ParmType->isLValueReferenceType()) ParmType = dyn_cast(ParmType)->getPointeeType().getTypePtr(); if (ParmType == EventType) { FindTransitVisitor(model, SrcState, EventType).TraverseStmt(React->getBody()); - reactMethodVector[i] = true; + reactMethodInReactions[i] = true; return true; } } else