Skip to content

Commit

Permalink
Cleanup|libdeng2|libcommon|Savegame Tool: Unnecessary explicit flushi…
Browse files Browse the repository at this point in the history
…ng of de::Files when setting to ReadOnly
  • Loading branch information
danij-deng committed Mar 21, 2014
1 parent 532a189 commit dc8b06c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion doomsday/libdeng2/src/game/savedsession.cpp
Expand Up @@ -336,7 +336,6 @@ void SavedSession::copyFile(SavedSession const &source)

File &destFile = App::fileSystem().root().replaceFile(String("/savegames") / d->repoPath + ".save");
Writer(destFile) << source.locateFile().archive();
destFile.flush();
destFile.setMode(File::ReadOnly);
destFile.parent()->populate(Folder::PopulateOnlyThisFolder);

Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/common/src/gamesessionwriter.cpp
Expand Up @@ -99,7 +99,6 @@ void GameSessionWriter::write(String const &userDescription)

File &outFile = App::rootFolder().locate<Folder>("/savegames").replaceFile(d->session.path() + ".save");
de::Writer(outFile) << arch;
outFile.flush();
outFile.setMode(File::ReadOnly);
LOG_MSG("Wrote ") << outFile.as<NativeFile>().nativePath().pretty();

Expand Down
1 change: 0 additions & 1 deletion doomsday/tools/savegametool/src/id1translator.cpp
Expand Up @@ -282,7 +282,6 @@ void Id1Translator::convert(Path path)

File &outFile = outputFolder().replaceFile(saveName.fileNameWithoutExtension() + ".save");
Writer(outFile) << arch;
outFile.flush();
outFile.setMode(File::ReadOnly);
LOG_MSG("Wrote ") << outFile.as<NativeFile>().nativePath().pretty();
}
1 change: 0 additions & 1 deletion doomsday/tools/savegametool/src/nativetranslator.cpp
Expand Up @@ -692,7 +692,6 @@ void NativeTranslator::convert(Path path)

File &outFile = outputFolder().replaceFile(saveName.fileNameWithoutExtension() + ".save");
Writer(outFile) << arch;
outFile.flush();
outFile.setMode(File::ReadOnly);
LOG_MSG("Wrote ") << outFile.as<NativeFile>().nativePath().pretty();
}

0 comments on commit dc8b06c

Please sign in to comment.