Skip to content

Commit

Permalink
Style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-derevenetz committed Dec 29, 2024
1 parent 2f75303 commit 9cddaa7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/fheroes2/army/army.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,20 @@ void Troops::Assign( const Troops & troops )
const_iterator it2 = troops.begin();

while ( it1 != end() && it2 != troops.end() ) {
if ( ( *it2 )->isValid() )
if ( ( *it2 )->isValid() ) {
( *it1 )->Set( **it2 );
}

++it2;
++it1;
}
}

void Troops::Insert( const Troops & troops )
{
for ( const_iterator it = troops.begin(); it != troops.end(); ++it )
for ( const_iterator it = troops.begin(); it != troops.end(); ++it ) {
push_back( new Troop( **it ) );
}
}

void Troops::PushBack( const Monster & mons, uint32_t count )
Expand Down
4 changes: 2 additions & 2 deletions src/fheroes2/army/army.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class Troops : protected std::vector<Troop *>
Troops & operator=( const Troops & ) = delete;

void Assign( const Troop * itbeg, const Troop * itend );
void Assign( const Troops & );
void Insert( const Troops & );
void Assign( const Troops & troops );
void Insert( const Troops & troops );
void PushBack( const Monster &, uint32_t );
void PopBack();

Expand Down

0 comments on commit 9cddaa7

Please sign in to comment.