From beb32bb24546705ba1d387a16bd0ca92087d5435 Mon Sep 17 00:00:00 2001 From: petr Date: Sat, 3 Dec 2011 20:18:45 +0100 Subject: [PATCH] Correct errors during printing multiple transitions in state. --- src/stringoper.h | 1 + src/visualizer.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stringoper.h b/src/stringoper.h index ba7019f..2d91b04 100644 --- a/src/stringoper.h +++ b/src/stringoper.h @@ -260,6 +260,7 @@ int get_model(const string line) /** Test the string to has a specified model. * break; default : return -1; } + return -1; } string get_params(string line) /** Return parameters of the specified transition */ diff --git a/src/visualizer.cpp b/src/visualizer.cpp index 522606c..2f4b9ab 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -288,12 +288,12 @@ class FindStates : public ASTConsumer const TagDecl *tagDecl = dyn_cast(decl); const DeclContext *declCont = tagDecl->castToDeclContext(tagDecl); output=""; - std::cout<decls_begin(), e = declCont->decls_end(); i != e; ++i) { - i->print(x); if (i->getKind()==26) // typedefs { + i->print(x); output = x.str(); line = clean_spaces(cut_type(output)); ret = find_transitions(state,line); @@ -481,7 +481,7 @@ int main(int argc, char **argv) inputFilename = f.Inputs[0].second; cout<<"Input filename: "<