diff options
author | Max Horn | 2008-08-09 23:07:32 +0000 |
---|---|---|
committer | Max Horn | 2008-08-09 23:07:32 +0000 |
commit | dca7116cb54026cfa3ee25148cf3b961f7febdd2 (patch) | |
tree | 0c9e698c19630e9c8b9a6c8055f76c10bc988a9c | |
parent | 39d2c3bdadfd2e27b109a82f63340d99a15cab44 (diff) | |
download | scummvm-rg350-dca7116cb54026cfa3ee25148cf3b961f7febdd2.tar.gz scummvm-rg350-dca7116cb54026cfa3ee25148cf3b961f7febdd2.tar.bz2 scummvm-rg350-dca7116cb54026cfa3ee25148cf3b961f7febdd2.zip |
Use FSNode API in default OSystem::openConfigFileForReading & OSystem::openConfigFileForWriting method implementations
svn-id: r33730
-rw-r--r-- | common/system.cpp | 18 |
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 } |