Skip to content

Commit

Permalink
Deduplicate code and call the proper function instead.
Browse files Browse the repository at this point in the history
The function contains character-by-character the same.
  • Loading branch information
BevapDin committed Nov 22, 2019
1 parent 3c8d837 commit 8c01ea4
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/savegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,7 @@ static void chkversion( std::istream &fin )
*/
void game::unserialize( std::istream &fin )
{
if( fin.peek() == '#' ) {
std::string vline;
getline( fin, vline );
std::string tmphash;
std::string tmpver;
int savedver = -1;
std::stringstream vliness( vline );
vliness >> tmphash >> tmpver >> savedver;
if( tmpver == "version" && savedver != -1 ) {
savegame_loading_version = savedver;
}
}
chkversion( fin );
std::string linebuf;

int tmpturn = 0;
Expand Down

0 comments on commit 8c01ea4

Please sign in to comment.