diff --git a/aconvert2/src/DotConverter.cpp b/aconvert2/src/DotConverter.cpp index 40878a6e8249be4a90778bf9b1445a3128368b76..41c94810a2c52a0062bace2448ad2bff3f2f963e 100644 --- a/aconvert2/src/DotConverter.cpp +++ b/aconvert2/src/DotConverter.cpp @@ -70,7 +70,7 @@ void DotConverter::convert(const automaton::EpsilonNFA& a, std::ostream& out) { //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -105,7 +105,7 @@ void DotConverter::convert(const automaton::NFA& a, std::ostream& out) { //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -173,7 +173,7 @@ void DotConverter::convert(const automaton::ExtendedNFA& a, std::ostream& out) { //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -208,7 +208,7 @@ void DotConverter::convert(const automaton::CompactNFA& a, std::ostream& out) { //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -309,7 +309,7 @@ void DotConverter::convert(const automaton::InputDrivenNPDA& a, std::ostream& ou //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -344,7 +344,7 @@ void DotConverter::convert(const automaton::VisiblyPushdownNPDA& a, std::ostream //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -379,7 +379,7 @@ void DotConverter::convert(const automaton::NPDA& a, std::ostream& out) { //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -414,7 +414,7 @@ void DotConverter::convert(const automaton::SinglePopNPDA& a, std::ostream& out) //Mark initial states out << "node [shape = plaintext, label=\"start\"]; 0; \n"; - for (const automaton::State state : a.getInitialStates()) { + for (const automaton::State& state : a.getInitialStates()) { out << "0 -> " << states.find(state)->second << ";\n"; } @@ -481,7 +481,7 @@ void DotConverter::transitions(const automaton::EpsilonNFA& fsm, const std::map< } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -508,7 +508,7 @@ void DotConverter::transitions(const automaton::NFA& fsm, const std::map<automat } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -533,7 +533,7 @@ void DotConverter::transitions(const automaton::DFA& fsm, const std::map<automat } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -560,7 +560,7 @@ void DotConverter::transitions(const automaton::ExtendedNFA& fsm, const std::map } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -587,7 +587,7 @@ void DotConverter::transitions(const automaton::CompactNFA& fsm, const std::map< } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -645,7 +645,7 @@ void DotConverter::transitions(const automaton::DPDA& pda, const std::map<automa } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -696,7 +696,7 @@ void DotConverter::transitions(const automaton::SinglePopDPDA& pda, const std::m } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -758,7 +758,7 @@ void DotConverter::transitions(const automaton::InputDrivenNPDA& pda, const std: } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -859,7 +859,7 @@ void DotConverter::transitions(const automaton::VisiblyPushdownNPDA& pda, const } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -921,7 +921,7 @@ void DotConverter::transitions(const automaton::NPDA& pda, const std::map<automa } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -976,7 +976,7 @@ void DotConverter::transitions(const automaton::SinglePopNPDA& pda, const std::m } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; } @@ -1021,7 +1021,7 @@ void DotConverter::transitions(const automaton::OneTapeDTM& tm, const std::map<a } //print the map - for (const std::pair<std::pair<int, int>, std::string> transition : transitions) { + for (const std::pair<std::pair<int, int>, std::string>& transition : transitions) { out << transition.first.first << " -> " << transition.first.second; out << "[label=\"" << transition.second << "\"]\n"; }