]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Do not require C++11 capable compiler
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 27 Aug 2012 21:07:31 +0000 (23:07 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 27 Aug 2012 21:07:31 +0000 (23:07 +0200)
src/Makefile
src/visualizer.cpp

index e29659dea90899aa523fc2d4485250d315368873..ccc7eb212c52e1ef9b0866282a7a9d7433bdc1cc 100644 (file)
@@ -10,4 +10,4 @@ CLANG_LIBS := -lclangParse -lclangFrontend -lclangSerialization       \
  -lclangRewrite -lclangAST -lclangLex -lclangBasic -lclangEdit
 
 visualizer.so: visualizer.cpp
-       $(CXX) -g -fno-rtti -shared -Wall --std=c++11 $(CLANG_LIBS) $(LLVM_FLAGS) -o $@ $<
+       $(CXX) -g -fno-rtti -shared -Wall $(CLANG_LIBS) $(LLVM_FLAGS) -o $@ $<
index 0d4998f6f19513479cd6b205d7e5da3adeaf26f4..4aceb86f8c10642e424962411d1fef257c38aa83 100644 (file)
@@ -27,6 +27,7 @@
 
 //clang header files
 #include "clang/AST/ASTConsumer.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/RecursiveASTVisitor.h"
 #include "clang/Frontend/CompilerInstance.h"
@@ -56,12 +57,12 @@ public:
        ofstream f(fn.c_str());
        f << "digraph " << name << " {\n";
        f << "  " << name_of_start << " [peripheries=2]\n";
-       for (string& s : states) {
-           f << "  " << s << "\n";
+       for (list<string>::iterator s = states.begin(), e = states.end(); s != e; ++s) {
+           f << "  " << *s << "\n";
        }
 
-       for (Transition &t : transitions) {
-           f << t.src << " -> " << t.dst << " [label = \"" << t.event << "\"]\n";
+       for (list<Transition>::iterator t = transitions.begin(), e = transitions.end(); t != e; ++t) {
+           f << t->src << " -> " << t->dst << " [label = \"" << t->event << "\"]\n";
        }
 
        f << "}";