aboutsummaryrefslogtreecommitdiff
path: root/common/system.cpp
diff options
context:
space:
mode:
authorChristopher Page2008-08-10 21:58:18 +0000
committerChristopher Page2008-08-10 21:58:18 +0000
commitfcc00f20b93d719c9f7bce848ed7c3600be982b9 (patch)
tree48b9fd1c842cb376985a91592ef7b062fed0cfa7 /common/system.cpp
parentce3d1e1a7d9ec9860d3fc42d8127a1634051d950 (diff)
parent9d0b0523cf119fdc400bf477c2f9d6f4f37ddce6 (diff)
downloadscummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.tar.gz
scummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.tar.bz2
scummvm-rg350-fcc00f20b93d719c9f7bce848ed7c3600be982b9.zip
Merged revisions 33719,33721-33723,33725-33727,33729-33730,33733,33736,33742,33754,33756,33758,33761,33763,33766 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r33769
Diffstat (limited to 'common/system.cpp')
-rw-r--r--common/system.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/common/system.cpp b/common/system.cpp
index 3e07e4ac4c..d0548cdd2d 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -163,25 +163,15 @@ static Common::String getDefaultConfigFileName() {
}
Common::SeekableReadStream *OSystem::openConfigFileForReading() {
- Common::File *confFile = new Common::File();
- assert(confFile);
- if (!confFile->open(getDefaultConfigFileName())) {
- delete confFile;
- confFile = 0;
- }
- return confFile;
+ FilesystemNode file(getDefaultConfigFileName());
+ return file.openForReading();
}
Common::WriteStream *OSystem::openConfigFileForWriting() {
#ifdef __DC__
return 0;
#else
- Common::DumpFile *confFile = new Common::DumpFile();
- assert(confFile);
- if (!confFile->open(getDefaultConfigFileName())) {
- delete confFile;
- confFile = 0;
- }
- return confFile;
+ FilesystemNode file(getDefaultConfigFileName());
+ return file.openForWriting();
#endif
}