diff --git a/alib2algo/src/tree/properties/ExactSubtreeRepeats.h b/alib2algo/src/tree/properties/ExactSubtreeRepeats.h index 0dced6effaba16759f0b70b214f52d2e54b4bff5..216b6568d3fe34f1a1d4ee995153008550607f9c 100644 --- a/alib2algo/src/tree/properties/ExactSubtreeRepeats.h +++ b/alib2algo/src/tree/properties/ExactSubtreeRepeats.h @@ -190,7 +190,8 @@ void ExactSubtreeRepeats::ExactSubtreeRepeatsAux::buildP ( const ext::vector < c if ( common::GlobalData::verbose ) { common::Streams::log << " P : "; - for ( auto it = P.begin ( ); it != P.end ( ); it++ ) common::Streams::log << * it << " "; + for ( unsigned parent : P ) + common::Streams::log << parent << " "; common::Streams::log << std::endl; } @@ -227,7 +228,8 @@ void ExactSubtreeRepeats::ExactSubtreeRepeatsAux::buildH ( const ext::vector < c if ( common::GlobalData::verbose ) { common::Streams::log << " H : "; - for ( auto it = H.begin ( ); it != H.end ( ); it++ ) common::Streams::log << * it << " "; + for ( unsigned height : H ) + common::Streams::log << height << " "; common::Streams::log << std::endl; } @@ -260,7 +262,8 @@ void ExactSubtreeRepeats::ExactSubtreeRepeatsAux::buildFC ( const ext::vector < if ( common::GlobalData::verbose ) { common::Streams::log << "FC : "; - for ( auto it = FC.begin ( ); it != FC.end ( ); it++ ) common::Streams::log << * it << " "; + for ( bool firstChild : FC ) + common::Streams::log << firstChild << " "; common::Streams::log << std::endl; } @@ -282,11 +285,11 @@ void ExactSubtreeRepeats::assignLevel ( ext::tuple < ext::deque < unsigned >, un unsigned root = i + l - 1; if ( root < aux.treeSize - 1 ) - if ( aux.FC[root] == true ) { + if ( aux.FC [ root ] ) { unsigned k = aux.H[aux.P[root]]; An[k].push_back ( i ); - if ( Bn[k] == false ) { + if ( ! Bn [ k ] ) { Bn[k] = true; Q4.push ( k ); } @@ -334,7 +337,7 @@ void ExactSubtreeRepeats::partition ( ext::tuple < ext::deque < unsigned >, unsi if ( aux.T[r] != 0 ) { std::get < 0 > ( En[aux.T[r]] ).push_back ( i ); - if ( Bn[aux.T[r]] == false ) { + if ( ! Bn [ aux.T [ r ] ] ) { Bn[aux.T[r]] = true; std::get < 1 > ( En[aux.T[r]] ) = l + aux.TL[r]; std::get < 2 > ( En[aux.T[r]] ) = ac - 1; @@ -344,7 +347,7 @@ void ExactSubtreeRepeats::partition ( ext::tuple < ext::deque < unsigned >, unsi unsigned v = aux.mu[r]; std::get < 0 > ( Es[v] ).push_back ( i ); - if ( Bs[v] == false ) { + if ( ! Bs [ v ] ) { Bs[v] = true; std::get < 1 > ( Es[v] ) = l + 1; std::get < 2 > ( Es[v] ) = ac + ( unsigned ) symbols[r].getRank ( ) - 1; @@ -416,7 +419,7 @@ void ExactSubtreeRepeats::repeatsPostfixRanked ( const ext::vector < common::ran if ( ( unsigned ) symbols[i].getRank ( ) == 0 ) { unsigned k = aux.mu[i]; - if ( Bs[k] == false ) { + if ( ! Bs[k] ) { Bs[k] = true; Q5.push ( k ); } @@ -450,7 +453,7 @@ void ExactSubtreeRepeats::repeatsPostfixRanked ( const ext::vector < common::ran while ( !Q5.empty ( ) ) { unsigned k = Q5.front ( ); Q5.pop ( ); - Bs[k] = 0; + Bs[k] = false; if ( common::GlobalData::verbose ) common::Streams::log << " ! Repeat : " << As[k] << " " << 1 << std::endl; @@ -487,8 +490,8 @@ void ExactSubtreeRepeats::repeatsPostfixRanked ( const ext::vector < common::ran if ( common::GlobalData::verbose ) { common::Streams::log << "Repeat postfix string : "; - for ( unsigned i = 0; i < post_repeats.size ( ); ++i ) - common::Streams::log << post_repeats[i] << " "; + for ( unsigned post_repeat : post_repeats ) + common::Streams::log << post_repeat << " "; common::Streams::log << std::endl; }