Skip to content

Commit 15319af

Browse files
authored
[ZH] Remove unnecessary try catch block in ~PlayerList() (#1015)
1 parent 0942bed commit 15319af

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Generals/Code/GameEngine/Source/Common/RTS/PlayerList.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,10 @@ PlayerList::PlayerList() :
8383
//-----------------------------------------------------------------------------
8484
PlayerList::~PlayerList()
8585
{
86-
try {
87-
// the world is happier if we reinit things before destroying them,
88-
// to avoid debug warnings
89-
init();
90-
} catch (...) {
91-
// nothing
92-
}
86+
// the world is happier if we reinit things before destroying them,
87+
// to avoid debug warnings
88+
init();
89+
9390
for( Int i = 0; i < MAX_PLAYER_COUNT; ++i )
9491
delete m_players[ i ];
9592
}

GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerList.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,10 @@ PlayerList::PlayerList() :
8383
//-----------------------------------------------------------------------------
8484
PlayerList::~PlayerList()
8585
{
86-
try {
87-
// the world is happier if we reinit things before destroying them,
88-
// to avoid debug warnings
89-
init();
90-
} catch (...) {
91-
// nothing
92-
}
86+
// the world is happier if we reinit things before destroying them,
87+
// to avoid debug warnings
88+
init();
89+
9390
for( Int i = 0; i < MAX_PLAYER_COUNT; ++i )
9491
delete m_players[ i ];
9592
}

0 commit comments

Comments
 (0)