Skip to content

Commit

Permalink
libcommon|SaveInfo: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 11, 2014
1 parent 67b7b24 commit b477448
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions doomsday/plugins/common/include/saveinfo.h
Expand Up @@ -27,7 +27,7 @@
#ifdef __cplusplus

/**
* Saved game session info.
* Represents a saved game session state.
*
* @ingroup libcommon
*/
Expand Down Expand Up @@ -55,13 +55,6 @@ class SaveInfo

SaveInfo &operator = (SaveInfo const &other);

/**
* Update the metadata associated with the save using values derived from the
* current game session. Note that this does @em not affect the copy of this save
* on disk.
*/
void applyCurrentSessionMetadata();

/**
* Determines whether the saved game session is compatibile with the current
* game session (and @em should therefore be loadable).
Expand Down Expand Up @@ -119,6 +112,13 @@ class SaveInfo
void read_Hx_v9(Reader *reader);
#endif

/**
* Update the metadata associated with the save using values derived from the
* current game session. Note that this does @em not affect the copy of this save
* on disk.
*/
void applyCurrentSessionMetadata();

public: /// @todo refactor away:
int magic() const;
};
Expand Down
26 changes: 13 additions & 13 deletions doomsday/plugins/common/src/saveinfo.cpp
Expand Up @@ -73,29 +73,29 @@ static void translateLegacyGameMode(gamemode_t *mode, int saveVersion)
#endif

SaveInfo::SaveInfo()
: _sessionId (0)
, _magic (0)
, _version (0)
, _gameMode(NUM_GAME_MODES)
, _mapUri (Uri_New())
: _sessionId(0)
, _magic (0)
, _version (0)
, _gameMode (NUM_GAME_MODES)
, _mapUri (Uri_New())
#if !__JHEXEN__
, _mapTime (0)
, _mapTime (0)
#endif
{
Str_InitStd(&_description);
#if !__JHEXEN__
memset(&_players, 0, sizeof(_players));
de::zap(_players);
#endif
memset(&_gameRules, 0, sizeof(_gameRules));
de::zap(_gameRules);
}

SaveInfo::SaveInfo(SaveInfo const &other)
: _sessionId (other._sessionId)
, _magic (other._magic)
, _version (other._version)
, _gameMode(other._gameMode)
: _sessionId(other._sessionId)
, _magic (other._magic)
, _version (other._version)
, _gameMode (other._gameMode)
#if !__JHEXEN__
, _mapTime (other._mapTime)
, _mapTime (other._mapTime)
#endif
{
Str_Copy(Str_InitStd(&_description), &other._description);
Expand Down

0 comments on commit b477448

Please sign in to comment.