]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Simplify the code
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 20 Jan 2013 14:59:03 +0000 (15:59 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 20 Jan 2013 14:59:03 +0000 (15:59 +0100)
src/visualizer.cpp

index 8bbdc55595bbd07681f036327163918c1b28db5c..5c932cb8f646bc38b7c8e1a4c3d8e23a65a3c727 100644 (file)
@@ -314,19 +314,12 @@ public:
        unsigned i = 0;
        IdentifierInfo& II = ASTCtx->Idents.get("react");
        for (DeclContext::lookup_const_result ReactRes = SrcState->lookup(DeclarationName(&II));
-            ReactRes.first != ReactRes.second; ++ReactRes.first) {
-           if (i < reactMethodInReactions.size()) {
-               if (reactMethodInReactions[i] == false) {
-                   CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first);
-                   Diag(React->getParamDecl(0)->getLocStart(), diag_warning) 
-                       << React->getParamDecl(0)->getType().getAsString() << " missing in typedef reactions";
-               }
-           } else {
+            ReactRes.first != ReactRes.second; ++ReactRes.first, ++i) {
+           if (i >= reactMethodInReactions.size() || reactMethodInReactions[i] == false) {
                CXXMethodDecl *React = dyn_cast<CXXMethodDecl>(*ReactRes.first);
-               Diag(React->getParamDecl(0)->getLocStart(), diag_warning) 
+               Diag(React->getParamDecl(0)->getLocStart(), diag_warning)
                    << React->getParamDecl(0)->getType().getAsString() << " missing in typedef reactions";
            }
-           i++;
        }
     }