Skip to content

Commit

Permalink
libcommon: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 23, 2014
1 parent 4edcc51 commit 3cb88ae
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/mapstatereader.cpp
Expand Up @@ -735,7 +735,7 @@ MapStateReader::~MapStateReader()

void MapStateReader::read(String const &mapUriStr)
{
PackageFolder const &pack = session();//.locateFile();
PackageFolder const &pack = session();

File const &mapStateFile = pack.locate<File>(Path("maps") / mapUriStr + "State");
SV_OpenFileForRead(mapStateFile);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_saveg.cpp
Expand Up @@ -53,7 +53,7 @@ targetplraddress_t *targetPlayerAddrs;
std::auto_ptr<de::game::MapStateReader>
SV_MapStateReader(de::game::SavedSession const &session, de::String mapUriStr)
{
de::PackageFolder const &pack = session;//.locateFile();
de::PackageFolder const &pack = session;
de::File const &mapStateFile = pack.locate<de::File>(de::Path("maps") / mapUriStr + "State");
if(!SV_OpenFileForRead(mapStateFile))
{
Expand Down
3 changes: 1 addition & 2 deletions doomsday/plugins/common/src/saveslots.cpp
Expand Up @@ -214,11 +214,10 @@ void SaveSlots::Slot::copySavedSessionFile(Slot const &source)
clear();

SavedSession const &sourceSession = source.savedSession();
// Copy the .save package.
//savedSession().copyFile(sourceSession);
if(&sourceSession == d->session) return; // Sanity check.

{
// Copy the .save package.
File &save = G_SaveFolder().replaceFile(d->saveFileName());
de::Writer(save) << sourceSession.archive();
save.setMode(File::ReadOnly);
Expand Down
8 changes: 1 addition & 7 deletions doomsday/plugins/doom/src/doomv9mapstatereader.cpp
Expand Up @@ -806,13 +806,8 @@ DoomV9MapStateReader::DoomV9MapStateReader(game::SavedSession const &session)
DoomV9MapStateReader::~DoomV9MapStateReader()
{}

void DoomV9MapStateReader::read(String const &mapUriStr)
void DoomV9MapStateReader::read(String const & /*mapUriStr*/)
{
PackageFolder const &pack = session();//.locateFile();
//game::SessionMetadata const &metadata = session().metadata();

File const &mapStateFile = pack.locate<File>(Path("maps") / mapUriStr + "State");
//SV_OpenFile(mapStateFile);
d->reader = SV_NewReader_Dm_v19();

d->readPlayers();
Expand Down Expand Up @@ -882,7 +877,6 @@ void DoomV9MapStateReader::read(String const &mapUriStr)

byte const consistency = Reader_ReadByte(d->reader);
Reader_Delete(d->reader); d->reader = 0;
SV_CloseFile_Dm_v19();

if(consistency != 0x1d)
{
Expand Down
8 changes: 1 addition & 7 deletions doomsday/plugins/heretic/src/hereticv13mapstatereader.cpp
Expand Up @@ -816,13 +816,8 @@ HereticV13MapStateReader::HereticV13MapStateReader(game::SavedSession const &ses
HereticV13MapStateReader::~HereticV13MapStateReader()
{}

void HereticV13MapStateReader::read(String const &mapUriStr)
void HereticV13MapStateReader::read(String const & /*mapUriStr*/)
{
PackageFolder const &pack = session();//.locateFile();
//game::SessionMetadata const &metadata = session().metadata();

File const &mapStateFile = pack.locate<File>(Path("maps") / mapUriStr + "State");
//SV_OpenFile(mapStateFile);
d->reader = SV_NewReader_Hr_v13();

d->readPlayers();
Expand Down Expand Up @@ -895,7 +890,6 @@ void HereticV13MapStateReader::read(String const &mapUriStr)

byte const consistency = Reader_ReadByte(d->reader);
Reader_Delete(d->reader); d->reader = 0;
SV_CloseFile_Hr_v13();

if(consistency != 0x1d)
{
Expand Down

0 comments on commit 3cb88ae

Please sign in to comment.