From aff4df7c97a81f282caf10dfe3aed8bd829076a3 Mon Sep 17 00:00:00 2001 From: Tomas Pecka <peckato1@fit.cvut.cz> Date: Sat, 1 Jun 2019 20:22:39 +0200 Subject: [PATCH] isolate multiline declarations --- alib2algo/src/automaton/simplify/Minimize.h | 9 ++++--- .../src/automaton/simplify/MinimizeVerbose.h | 3 ++- .../src/equations/RegularEquationSolver.h | 3 ++- .../simplify/UnreachableSymbolsRemover.h | 3 ++- alib2algo/src/regexp/glushkov/GlushkovFirst.h | 6 +++-- .../src/regexp/glushkov/GlushkovFollow.h | 4 ++- .../simplify/RegExpOptimizeUnboundedPart.hpp | 3 ++- alib2algo/src/rte/glushkov/GlushkovFirst.h | 6 +++-- .../src/rte/glushkov/GlushkovFollowNaive.h | 6 +++-- alib2algo/src/string/naive/ExactCompare.h | 10 ++++--- alib2algo/src/string/naive/ExactEqual.h | 7 +++-- .../compression/ArithmeticCompression.h | 6 +++-- .../compression/ArithmeticDecompression.h | 3 ++- .../stringology/properties/LyndonFactoring.h | 3 ++- ...erimentalCompactSuffixAutomatonConstruct.h | 27 ++++++++++++++----- alib2data/src/common/SparseBoolVector.hpp | 3 ++- .../src/rte/xml/common/RTEFromXmlParser.h | 3 ++- alib2graph_algo/src/shortest_path/AStar.hpp | 3 ++- .../src/shortest_path/Dijkstra.hpp | 3 ++- alib2graph_algo/src/shortest_path/MM.hpp | 3 ++- alib2graph_algo/src/traverse/BFS.hpp | 3 ++- alib2graph_algo/src/traverse/IDDFS.hpp | 3 ++- aql2/src/prompt/ReadlinePromptCompletion.h | 3 ++- 23 files changed, 85 insertions(+), 38 deletions(-) diff --git a/alib2algo/src/automaton/simplify/Minimize.h b/alib2algo/src/automaton/simplify/Minimize.h index 7159e91c84..d05210f0f0 100644 --- a/alib2algo/src/automaton/simplify/Minimize.h +++ b/alib2algo/src/automaton/simplify/Minimize.h @@ -127,7 +127,8 @@ automaton::DFA < SymbolType, StateType > Minimize::minimize(const automaton::DFA ext::map<StateType, StateType> toEquivalentStates; //original state to equivalent state ext::map<std::pair<StateType, ext::set<std::pair<SymbolType, StateType> > >, ext::set<StateType> > minimizedTransitionFunction; //mapped to the original state - const StateType *firstFinal = nullptr, *firstNonfinal = nullptr; + const StateType *firstFinal = nullptr; + const StateType *firstNonfinal = nullptr; for(const StateType& state : dfa.getStates()) { if(dfa.getFinalStates().count(state) == 0) { // not a final state if(!firstNonfinal) @@ -216,7 +217,8 @@ void Minimize::print_progress(const automaton::DFA < SymbolType, StateType >& df } } - size_t stateWidth = 1, stateMapWidth = 1; + size_t stateWidth = 1; + size_t stateMapWidth = 1; ext::map<SymbolType, size_t> colWidths; std::ostringstream ss; @@ -303,7 +305,8 @@ automaton::DFTA < SymbolType, RankType, StateType > Minimize::minimize(const aut ext::map <StateType, StateType> toEquivalentStates; ext::map<std::pair<StateType, ext::map<ext::tuple<common::ranked_symbol<SymbolType, RankType>, ext::vector<StateType>, StateType >, ext::set<int> > >, ext::set<StateType> > minimizedTransitionFunction; //mapped to the original states - const StateType *firstFinal = nullptr, *firstNonfinal = nullptr; + const StateType *firstFinal = nullptr; + const StateType *firstNonfinal = nullptr; for (const StateType &state : dfta.getStates()) { if (dfta.getFinalStates().count(state) == 0) { // not a final state if (!firstNonfinal) diff --git a/alib2algo/src/automaton/simplify/MinimizeVerbose.h b/alib2algo/src/automaton/simplify/MinimizeVerbose.h index da5e02fdf9..59f17fa161 100644 --- a/alib2algo/src/automaton/simplify/MinimizeVerbose.h +++ b/alib2algo/src/automaton/simplify/MinimizeVerbose.h @@ -81,7 +81,8 @@ ext::vector < ext::map < std::pair < StateType, StateType >, ext::map < SymbolTy ext::map<StateType, StateType> toEquivalentStates; //original state to equivalent state ext::map<std::pair<StateType, ext::set<std::pair<SymbolType, StateType> > >, ext::set<StateType> > minimizedTransitionFunction; //mapped to the original state - const StateType *firstFinal = nullptr, *firstNonfinal = nullptr; + const StateType *firstFinal = nullptr; + const StateType *firstNonfinal = nullptr; for(const StateType& state : dfa.getStates()) { if(dfa.getFinalStates().count(state) == 0) { // not a final state if(!firstNonfinal) diff --git a/alib2algo/src/equations/RegularEquationSolver.h b/alib2algo/src/equations/RegularEquationSolver.h index a9af6e349d..432b785578 100644 --- a/alib2algo/src/equations/RegularEquationSolver.h +++ b/alib2algo/src/equations/RegularEquationSolver.h @@ -110,7 +110,8 @@ protected: template < class TerminalSymbolType, class VariableSymbolType > void RegularEquationSolver < TerminalSymbolType, VariableSymbolType >::setVariableSymbols ( const ext::set < VariableSymbolType > & newSymbols ) { - ext::set < VariableSymbolType > removed, added; + ext::set < VariableSymbolType > removed; + ext::set < VariableSymbolType > added; std::set_difference ( nonterminalSymbols.begin ( ), nonterminalSymbols.end ( ), newSymbols.begin ( ), newSymbols.end ( ), std::inserter ( removed, removed.end ( ) ) ); std::set_difference ( newSymbols.begin ( ), newSymbols.end ( ), nonterminalSymbols.begin ( ), nonterminalSymbols.end ( ), std::inserter ( added, added.end ( ) ) ); diff --git a/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.h b/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.h index ec7bd80a2a..7a84db3f96 100644 --- a/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.h +++ b/alib2algo/src/grammar/simplify/UnreachableSymbolsRemover.h @@ -61,7 +61,8 @@ T UnreachableSymbolsRemover::remove( const T & grammar) { T ret ( grammar.getInitialSymbol ( ) ); - ext::set < ext::variant < TerminalSymbolType, NonterminalSymbolType > > newNonTerminals, newTerminals; + ext::set < ext::variant < TerminalSymbolType, NonterminalSymbolType > > newNonTerminals; + ext::set < ext::variant < TerminalSymbolType, NonterminalSymbolType > > newTerminals; set_intersection( Vt.begin( ), Vt.end( ), grammar.getNonterminalAlphabet( ).begin( ), grammar.getNonterminalAlphabet( ).end( ), std::inserter( newNonTerminals, newNonTerminals.begin( ) ) ); for( const auto & symbol : newNonTerminals ) diff --git a/alib2algo/src/regexp/glushkov/GlushkovFirst.h b/alib2algo/src/regexp/glushkov/GlushkovFirst.h index 8056a9453c..eedb859791 100644 --- a/alib2algo/src/regexp/glushkov/GlushkovFirst.h +++ b/alib2algo/src/regexp/glushkov/GlushkovFirst.h @@ -75,7 +75,8 @@ ext::set < UnboundedRegExpSymbol < SymbolType > > GlushkovFirst::first ( const r template < class SymbolType > ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovFirst::Unbounded < SymbolType >::visit ( const regexp::UnboundedRegExpAlternation < SymbolType > & node ) { - ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret, tmp; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > tmp; for ( const UnboundedRegExpElement < SymbolType > & element : node.getElements ( ) ) { tmp = element.template accept < ext::set < regexp::UnboundedRegExpSymbol < SymbolType > >, GlushkovFirst::Unbounded < SymbolType > > ( ); @@ -87,7 +88,8 @@ ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovFirst::Unbound template < class SymbolType > ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovFirst::Unbounded < SymbolType >::visit ( const regexp::UnboundedRegExpConcatenation < SymbolType > & node ) { - ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret, tmp; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > tmp; for ( const UnboundedRegExpElement < SymbolType > & element : node.getElements ( ) ) { tmp = element.template accept < ext::set < regexp::UnboundedRegExpSymbol < SymbolType > >, GlushkovFirst::Unbounded < SymbolType > > ( ); diff --git a/alib2algo/src/regexp/glushkov/GlushkovFollow.h b/alib2algo/src/regexp/glushkov/GlushkovFollow.h index ec243d2759..d75fc63850 100644 --- a/alib2algo/src/regexp/glushkov/GlushkovFollow.h +++ b/alib2algo/src/regexp/glushkov/GlushkovFollow.h @@ -91,7 +91,9 @@ ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovFollow::Unboun template < class SymbolType > ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > GlushkovFollow::Unbounded < SymbolType >::visit ( const regexp::UnboundedRegExpConcatenation < SymbolType > & node, const regexp::UnboundedRegExpSymbol < SymbolType > & symbolptr ) { - ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret, tmp, lastSet; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > ret; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > tmp; + ext::set < regexp::UnboundedRegExpSymbol < SymbolType > > lastSet; for ( auto e = node.getElements ( ).begin ( ); e != node.getElements ( ).end ( ); e++ ) { if ( ! e->template accept < bool, GlushkovPos::Unbounded < SymbolType > > ( symbolptr ) ) diff --git a/alib2algo/src/regexp/simplify/RegExpOptimizeUnboundedPart.hpp b/alib2algo/src/regexp/simplify/RegExpOptimizeUnboundedPart.hpp index a257b046a7..2ccd5fd9ce 100644 --- a/alib2algo/src/regexp/simplify/RegExpOptimizeUnboundedPart.hpp +++ b/alib2algo/src/regexp/simplify/RegExpOptimizeUnboundedPart.hpp @@ -726,7 +726,8 @@ bool RegExpOptimize::Unbounded < SymbolType >::V9( UnboundedRegExpConcatenation it = std::prev ( it ); } else { // find range from <it+1;sth> and <concat.begin;sth> that is equal - auto c1Iter = std::next( it ), c2Iter = concat->begin( ); + auto c1Iter = std::next( it ); + auto c2Iter = concat->begin( ); while( c1Iter != node.end() && c2Iter != concat->end( ) && *c1Iter == * c2Iter ) { ++ c1Iter; ++ c2Iter; diff --git a/alib2algo/src/rte/glushkov/GlushkovFirst.h b/alib2algo/src/rte/glushkov/GlushkovFirst.h index 027e73c08a..6ceb06a553 100644 --- a/alib2algo/src/rte/glushkov/GlushkovFirst.h +++ b/alib2algo/src/rte/glushkov/GlushkovFirst.h @@ -43,7 +43,8 @@ ext::set < common::ranked_symbol < SymbolType, RankType > > GlushkovFirst::first template < class SymbolType, class RankType > ext::set < common::ranked_symbol < SymbolType, RankType > > GlushkovFirst::Formal < SymbolType, RankType >::visit ( const rte::FormalRTEAlternation < SymbolType, RankType > & node ) { - ext::set < common::ranked_symbol < SymbolType, RankType > > ret, tmp; + ext::set < common::ranked_symbol < SymbolType, RankType > > ret; + ext::set < common::ranked_symbol < SymbolType, RankType > > tmp; tmp = node.getLeftElement ( ).template accept < ext::set < common::ranked_symbol < SymbolType, RankType > >, GlushkovFirst::Formal < SymbolType, RankType > > ( ); ret.insert ( tmp.begin ( ), tmp.end ( ) ); @@ -56,7 +57,8 @@ ext::set < common::ranked_symbol < SymbolType, RankType > > GlushkovFirst::Forma template < class SymbolType, class RankType > ext::set < common::ranked_symbol < SymbolType, RankType > > GlushkovFirst::Formal < SymbolType, RankType >::visit ( const rte::FormalRTESubstitution < SymbolType, RankType > & node ) { - ext::set < common::ranked_symbol < SymbolType, RankType > > ret, tmp; + ext::set < common::ranked_symbol < SymbolType, RankType > > ret; + ext::set < common::ranked_symbol < SymbolType, RankType > > tmp; tmp = node.getLeftElement ( ).template accept < ext::set < common::ranked_symbol < SymbolType, RankType > >, GlushkovFirst::Formal < SymbolType, RankType > > ( ); ret.insert ( tmp.begin ( ), tmp.end ( ) ); diff --git a/alib2algo/src/rte/glushkov/GlushkovFollowNaive.h b/alib2algo/src/rte/glushkov/GlushkovFollowNaive.h index 29b26b5fc0..e24f4887f0 100644 --- a/alib2algo/src/rte/glushkov/GlushkovFollowNaive.h +++ b/alib2algo/src/rte/glushkov/GlushkovFollowNaive.h @@ -153,7 +153,8 @@ ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > Glus template < class SymbolType, class RankType > ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > GlushkovFollowNaive::Formal < SymbolType, RankType >::visit ( const rte::FormalRTEAlternation < SymbolType, RankType > & node, const common::ranked_symbol < SymbolType, RankType > & symbolF, const TAlphabet < SymbolType, RankType > & alphabetK, TSubstMap < SymbolType, RankType > & subMap ) { - ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > ret, tmp; + ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > ret; + ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > tmp; tmp = node.getLeftElement ( ).template accept < ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > >, GlushkovFollowNaive::Formal < SymbolType, RankType > > ( symbolF, alphabetK, subMap ); ret.insert ( tmp.begin ( ), tmp.end ( ) ); @@ -206,7 +207,8 @@ ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > Glus template < class SymbolType, class RankType > ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > GlushkovFollowNaive::Formal < SymbolType, RankType >::visit ( const rte::FormalRTESymbolAlphabet < SymbolType, RankType > & node, const common::ranked_symbol < SymbolType, RankType > & symbolF, const TAlphabet < SymbolType, RankType > & alphabetK, TSubstMap < SymbolType, RankType > & subMap ) { - ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > ret, tmp; + ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > ret; + ext::set < ext::vector < common::ranked_symbol < SymbolType, RankType > > > tmp; if ( symbolF == node.getSymbol ( ) ) { ext::vector < ext::set < common::ranked_symbol < SymbolType, RankType > > > children; diff --git a/alib2algo/src/string/naive/ExactCompare.h b/alib2algo/src/string/naive/ExactCompare.h index 6ca0e72697..b15deb16f2 100644 --- a/alib2algo/src/string/naive/ExactCompare.h +++ b/alib2algo/src/string/naive/ExactCompare.h @@ -50,7 +50,8 @@ public: template < class SymbolType > int ExactCompare::compare ( const string::LinearString < SymbolType > & u, const string::LinearString < SymbolType > & v ) { - int n = ( int ) u.getContent ( ).size ( ), m = ( int ) v.getContent ( ).size ( ); + int n = ( int ) u.getContent ( ).size ( ); + int m = ( int ) v.getContent ( ).size ( ); int k = 0; while ( k < n && k < m && u.getContent ( )[k] == v.getContent ( )[k] ) k++; @@ -69,8 +70,11 @@ int ExactCompare::compare ( const string::LinearString < SymbolType > & u, const template < class SymbolType > int ExactCompare::compare ( const string::CyclicString < SymbolType > & u, const string::CyclicString < SymbolType > & v ) { - int n = ( int ) u.getContent ( ).size ( ), m = ( int ) v.getContent ( ).size ( ); - int i = -1, j = -1, k; + int n = ( int ) u.getContent ( ).size ( ); + int m = ( int ) v.getContent ( ).size ( ); + int i = -1; + int j = -1; + int k; bool last = 0; diff --git a/alib2algo/src/string/naive/ExactEqual.h b/alib2algo/src/string/naive/ExactEqual.h index d9eb92be45..8c8091e039 100644 --- a/alib2algo/src/string/naive/ExactEqual.h +++ b/alib2algo/src/string/naive/ExactEqual.h @@ -50,7 +50,8 @@ public: template < class SymbolType > bool ExactEqual::equals ( const string::LinearString < SymbolType > & u, const string::LinearString < SymbolType > & v ) { - int n = ( int ) u.getContent ( ).size ( ), m = ( int ) v.getContent ( ).size ( ); + int n = ( int ) u.getContent ( ).size ( ); + int m = ( int ) v.getContent ( ).size ( ); int k = 0; while ( k < n && k < m && u.getContent ( )[k] == v.getContent ( )[k] ) k++; @@ -64,7 +65,9 @@ bool ExactEqual::equals ( const string::LinearString < SymbolType > & u, const s template < class SymbolType > bool ExactEqual::equals ( const string::CyclicString < SymbolType > & u, const string::CyclicString < SymbolType > & v ) { int n = ( int ) u.getContent ( ).size ( ); - int i = -1, j = -1, k; + int i = -1; + int j = -1; + int k; if ( n != ( int ) v.getContent ( ).size ( ) ) return false; diff --git a/alib2algo/src/stringology/compression/ArithmeticCompression.h b/alib2algo/src/stringology/compression/ArithmeticCompression.h index 953f2f94ed..211d94866d 100644 --- a/alib2algo/src/stringology/compression/ArithmeticCompression.h +++ b/alib2algo/src/stringology/compression/ArithmeticCompression.h @@ -67,7 +67,8 @@ public: template < class Callback > void encode ( const SymbolType & symbol, Callback && callback ) { - unsigned prob_low, prob_high; + unsigned prob_low; + unsigned prob_high; unsigned prob_count = m_model.getCount ( ); m_model.getProbability ( symbol, prob_low, prob_high ); @@ -78,7 +79,8 @@ public: template < class Callback > void finalize ( Callback && callback ) { - unsigned prob_low, prob_high; + unsigned prob_low; + unsigned prob_high; unsigned prob_count = m_model.getCount ( ); m_model.getProbabilityEof ( prob_low, prob_high ); diff --git a/alib2algo/src/stringology/compression/ArithmeticDecompression.h b/alib2algo/src/stringology/compression/ArithmeticDecompression.h index bcd3edc41c..4b9aa80cfd 100644 --- a/alib2algo/src/stringology/compression/ArithmeticDecompression.h +++ b/alib2algo/src/stringology/compression/ArithmeticDecompression.h @@ -71,7 +71,8 @@ public: template < class Callback > SymbolType decode ( Callback && callback ) { - unsigned prob_low, prob_high; + unsigned prob_low; + unsigned prob_high; SymbolType c = m_model.getChar ( m_scaled_value, prob_low, prob_high ); m_model.update ( c ); diff --git a/alib2algo/src/stringology/properties/LyndonFactoring.h b/alib2algo/src/stringology/properties/LyndonFactoring.h index 4bedf407d3..0fbc5ddd87 100644 --- a/alib2algo/src/stringology/properties/LyndonFactoring.h +++ b/alib2algo/src/stringology/properties/LyndonFactoring.h @@ -35,7 +35,8 @@ ext::vector < unsigned > LyndonFactoring::factorize ( const string::LinearString ext::vector < unsigned > factorization; while ( i < n ) { - int j = i + 1, k = i; + int j = i + 1; + int k = i; while ( j < n && string.getContent ( ) [ k ] <= string.getContent ( ) [ j ] ) { if ( string.getContent ( ) [ k ] < string.getContent ( ) [ j ] ) k = i; diff --git a/alib2algo_experimental/src/stringology/indexing/ExperimentalCompactSuffixAutomatonConstruct.h b/alib2algo_experimental/src/stringology/indexing/ExperimentalCompactSuffixAutomatonConstruct.h index 3185af9f5f..56a5091fab 100644 --- a/alib2algo_experimental/src/stringology/indexing/ExperimentalCompactSuffixAutomatonConstruct.h +++ b/alib2algo_experimental/src/stringology/indexing/ExperimentalCompactSuffixAutomatonConstruct.h @@ -69,7 +69,9 @@ class ExperimentalCompactSuffixAutomatonConstruct { //pomocná funkce ve funkci separate_node řádek 9 void replaceThewkEdge(int s, int k, int p, int rc) { - int kcc,scc,pcc; + int kcc; + int scc; + int pcc; wkEdge(s,w.at(k),scc,kcc,pcc); edges.at(s).erase({kcc,pcc}); @@ -100,7 +102,9 @@ class ExperimentalCompactSuffixAutomatonConstruct { bool check_end_point(int s,int k,int p, const SymbolType & c) { if(k<= p) { - int sc,kc,pc;//s' k' p' + int sc; + int kc; + int pc;//s' k' p' wkEdge(s,w.at(k),sc,kc,pc); return (c == w.at(kc+p-k+1)); } @@ -108,7 +112,9 @@ class ExperimentalCompactSuffixAutomatonConstruct { } int split_edge(int s,int k,int p) { - int sc,kc,pc;//s' k' p' + int sc; + int kc; + int pc;//s' k' p' wkEdge(s,w.at(k),sc,kc,pc); int r = createNode(); @@ -126,7 +132,9 @@ class ExperimentalCompactSuffixAutomatonConstruct { if(k>p) return ext::make_pair ( s, k ); - int sc,kc,pc; + int sc; + int kc; + int pc; wkEdge(s,w.at(k),sc,kc,pc); if(pc == INT_MAX) @@ -145,7 +153,9 @@ class ExperimentalCompactSuffixAutomatonConstruct { } void redirect_edge(int s, int k, int p, int r) { - int sc,kc,pc; + int sc; + int kc; + int pc; wkEdge(s,w.at(k),sc,kc,pc); replaceTheEdgeByEdge(s,k,p,kc,pc,r); @@ -155,13 +165,16 @@ class ExperimentalCompactSuffixAutomatonConstruct { if(k > p) return s; - int kc,pc,sc; + int kc; + int pc; + int sc; wkEdge(s,w.at(k),sc,kc,pc); return sc; } ext::pair<int,int> separate_node(int s,int k,int p) { //p==e - int sc, kc; + int sc; + int kc; std::tie ( sc, kc ) = canonize(s,k,p); if ( kc <= p) return ext::make_pair ( sc, kc ); diff --git a/alib2data/src/common/SparseBoolVector.hpp b/alib2data/src/common/SparseBoolVector.hpp index 8bee5ef482..b8a2401e67 100644 --- a/alib2data/src/common/SparseBoolVector.hpp +++ b/alib2data/src/common/SparseBoolVector.hpp @@ -477,7 +477,8 @@ struct compare < common::SparseBoolVector > { if(first.size() > second.size()) return 1; static compare < unsigned > comp; - auto iterF = first.begin(), iterS = second.begin(); + auto iterF = first.begin(); + auto iterS = second.begin(); for(; iterF != first.end() && iterS != second.end ( ); ++iterF, ++iterS) { int res = comp(*iterF, *iterS); diff --git a/alib2data/src/rte/xml/common/RTEFromXmlParser.h b/alib2data/src/rte/xml/common/RTEFromXmlParser.h index 6582fbcb84..c3e38ed1b2 100644 --- a/alib2data/src/rte/xml/common/RTEFromXmlParser.h +++ b/alib2data/src/rte/xml/common/RTEFromXmlParser.h @@ -48,7 +48,8 @@ public: template < class SymbolType, class RankType > std::pair < ext::set < common::ranked_symbol < SymbolType, RankType > >, ext::set < common::ranked_symbol < SymbolType, RankType > > > RTEFromXmlParser::parseAlphabet ( ext::deque < sax::Token >::iterator & input ) { - ext::set < common::ranked_symbol < SymbolType, RankType > > alphabetF, alphabetK; + ext::set < common::ranked_symbol < SymbolType, RankType > > alphabetF; + ext::set < common::ranked_symbol < SymbolType, RankType > > alphabetK; sax::FromXMLParserHelper::popToken ( input, sax::Token::TokenType::START_ELEMENT, "alphabet" ); diff --git a/alib2graph_algo/src/shortest_path/AStar.hpp b/alib2graph_algo/src/shortest_path/AStar.hpp index 45f2d2692f..a40afa0d81 100644 --- a/alib2graph_algo/src/shortest_path/AStar.hpp +++ b/alib2graph_algo/src/shortest_path/AStar.hpp @@ -328,7 +328,8 @@ AStar::implBidirectional(const TGraph &graph, TWeight p = std::numeric_limits<TWeight>::max(); // Currently best path weight ext::vector<TNode> intersection_nodes; // Last one is currently best intersection node - Data<TNode, TWeight> forward_data, backward_data; + Data<TNode, TWeight> forward_data; + Data<TNode, TWeight> backward_data; // Init forward search init(forward_data, start, f_heuristic_forward); diff --git a/alib2graph_algo/src/shortest_path/Dijkstra.hpp b/alib2graph_algo/src/shortest_path/Dijkstra.hpp index cabfe7b42b..f96920b2fa 100644 --- a/alib2graph_algo/src/shortest_path/Dijkstra.hpp +++ b/alib2graph_algo/src/shortest_path/Dijkstra.hpp @@ -333,7 +333,8 @@ Dijkstra::implBidirectional(const TGraph &graph, weight_type p = std::numeric_limits<weight_type>::max(); // Currently best path weight ext::vector<TNode> intersection_nodes; // Last one is currently best intersection node - Data<TNode, weight_type> forward_data, backward_data; + Data<TNode, weight_type> forward_data; + Data<TNode, weight_type> backward_data; // Init forward search init(forward_data, start); diff --git a/alib2graph_algo/src/shortest_path/MM.hpp b/alib2graph_algo/src/shortest_path/MM.hpp index eb213fc037..333b629c2c 100644 --- a/alib2graph_algo/src/shortest_path/MM.hpp +++ b/alib2graph_algo/src/shortest_path/MM.hpp @@ -137,7 +137,8 @@ MM::findPathBidirectional(const TGraph &graph, weight_type p = std::numeric_limits<weight_type>::max(); // Currently best path weight ext::vector<TNode> intersection_nodes; // Last one is currently best intersection node - Data<TNode, weight_type> forward_data, backward_data; + Data<TNode, weight_type> forward_data; + Data<TNode, weight_type> backward_data; // Init forward search init(forward_data, start, f_heuristic_forward); diff --git a/alib2graph_algo/src/traverse/BFS.hpp b/alib2graph_algo/src/traverse/BFS.hpp index f744d68ed8..462095e9b1 100644 --- a/alib2graph_algo/src/traverse/BFS.hpp +++ b/alib2graph_algo/src/traverse/BFS.hpp @@ -271,7 +271,8 @@ BFS::implBidirectional(const TGraph &graph, const TNode &start, const TNode &goal, F1 f_user) { - Data<TNode> forward_data, backward_data; + Data<TNode> forward_data; + Data<TNode> backward_data; ext::vector<TNode> intersection; // Init forward search diff --git a/alib2graph_algo/src/traverse/IDDFS.hpp b/alib2graph_algo/src/traverse/IDDFS.hpp index df6767aa0d..9e31ab7dce 100644 --- a/alib2graph_algo/src/traverse/IDDFS.hpp +++ b/alib2graph_algo/src/traverse/IDDFS.hpp @@ -413,7 +413,8 @@ ext::vector<TNode> IDDFS::constructPath(const TGraph &graph, TNode intersection, unsigned long max_forward_depth, unsigned long max_backward_depth) { - Data<TNode> forward_data, backward_data; + Data<TNode> forward_data; + Data<TNode> backward_data; init(forward_data, start); init(backward_data, goal); diff --git a/aql2/src/prompt/ReadlinePromptCompletion.h b/aql2/src/prompt/ReadlinePromptCompletion.h index c3c5a7cb6e..e7f65e9111 100644 --- a/aql2/src/prompt/ReadlinePromptCompletion.h +++ b/aql2/src/prompt/ReadlinePromptCompletion.h @@ -150,7 +150,8 @@ private: /* merge choices from all generators */ const std::vector < std::function < std::set < std::string > ( const char* ) > > gens = { generators... }; for ( const auto & gen : gens ) { - std::set < std::string > tmpres, tmpg = gen ( text ); + std::set < std::string > tmpres; + std::set < std::string > tmpg = gen ( text ); std::set_union ( std::begin ( choices ), std::end ( choices ), std::begin ( tmpg ), std::end ( tmpg ), -- GitLab