diff options
author | Max Horn | 2009-05-19 11:42:14 +0000 |
---|---|---|
committer | Max Horn | 2009-05-19 11:42:14 +0000 |
commit | 65b5d318140c7ff846455a37ec7ae63e635bcdcf (patch) | |
tree | 77f278ceec1e54e097056df0b2820e414eed8290 | |
parent | 4d59f620f9fdc1dfd7ccd6c7d30a0b5de480eb20 (diff) | |
download | scummvm-rg350-65b5d318140c7ff846455a37ec7ae63e635bcdcf.tar.gz scummvm-rg350-65b5d318140c7ff846455a37ec7ae63e635bcdcf.tar.bz2 scummvm-rg350-65b5d318140c7ff846455a37ec7ae63e635bcdcf.zip |
COMMON: Removed Stream::ioFailed() and clearIOFailed(), as they are deprecated; however, retained ioFailed in SeekableReadStream and File for now (so for now this mainly affects WriteStream subclasses)
svn-id: r40725
-rw-r--r-- | backends/saves/savefile.cpp | 4 | ||||
-rw-r--r-- | common/config-file.cpp | 6 | ||||
-rw-r--r-- | common/config-manager.cpp | 2 | ||||
-rw-r--r-- | common/file.cpp | 14 | ||||
-rw-r--r-- | common/file.h | 25 | ||||
-rw-r--r-- | common/stream.h | 17 | ||||
-rw-r--r-- | common/unzip.cpp | 26 | ||||
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 2 | ||||
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 2 | ||||
-rw-r--r-- | engines/agi/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/cine/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/drascula/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/gob/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/queen/queen.cpp | 2 | ||||
-rw-r--r-- | engines/saga/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/sky/control.cpp | 6 | ||||
-rw-r--r-- | engines/sky/detection.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/control.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/touche/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/tucker/saveload.cpp | 2 | ||||
-rw-r--r-- | graphics/font.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/mt32.cpp | 2 |
26 files changed, 67 insertions, 75 deletions
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp index 98a3d6b449..29d477a6c1 100644 --- a/backends/saves/savefile.cpp +++ b/backends/saves/savefile.cpp @@ -50,14 +50,14 @@ bool SaveFileManager::renameSavefile(const char *oldFilename, const char *newFil if (buffer && outFile) { inFile->read(buffer, size); - bool error = inFile->ioFailed(); + bool error = inFile->err(); delete inFile; inFile = 0; if (!error) { outFile->write(buffer, size); outFile->finalize(); - if (!outFile->ioFailed()) { + if (!outFile->err()) { success = removeSavefile(oldFilename); } } diff --git a/common/config-file.cpp b/common/config-file.cpp index 61437a60ab..9b69452b2e 100644 --- a/common/config-file.cpp +++ b/common/config-file.cpp @@ -87,7 +87,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) { // TODO: Detect if a section occurs multiple times (or likewise, if // a key occurs multiple times inside one section). - while (!stream.eos() && !stream.ioFailed()) { + while (!stream.eos() && !stream.err()) { lineno++; // Read a line @@ -179,7 +179,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) { if (!section.name.empty()) _sections.push_back(section); - return (!stream.ioFailed() || stream.eos()); + return (!stream.err() || stream.eos()); } bool ConfigFile::saveToFile(const String &filename) { @@ -232,7 +232,7 @@ bool ConfigFile::saveToStream(WriteStream &stream) { } stream.flush(); - return !stream.ioFailed(); + return !stream.err(); } diff --git a/common/config-manager.cpp b/common/config-manager.cpp index f001c1821a..268fac5d2e 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -114,7 +114,7 @@ void ConfigManager::loadFromStream(SeekableReadStream &stream) { // TODO: Detect if a domain occurs multiple times (or likewise, if // a key occurs multiple times inside one domain). - while (!stream.eos() && !stream.ioFailed()) { + while (!stream.eos() && !stream.err()) { lineno++; // Read a line diff --git a/common/file.cpp b/common/file.cpp index ee741a8990..7836a7d4a8 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -58,10 +58,8 @@ bool File::open(const String &filename, Archive &archive) { assert(!filename.empty()); assert(!_handle); - clearIOFailed(); - SeekableReadStream *stream = 0; - + if ((stream = archive.createReadStreamForMember(filename))) { debug(3, "Opening hashed: %s", filename.c_str()); } else if ((stream = archive.createReadStreamForMember(filename + "."))) { @@ -90,7 +88,6 @@ bool File::open(const FSNode &node) { bool File::open(SeekableReadStream *stream, const Common::String &name) { assert(!_handle); - clearIOFailed(); if (stream) { _handle = stream; @@ -124,13 +121,12 @@ bool File::isOpen() const { } bool File::ioFailed() const { - // TODO/FIXME: Just use ferror() here? - return !_handle || _handle->ioFailed(); + return !_handle || (eos() || err()); } void File::clearIOFailed() { if (_handle) - _handle->clearIOFailed(); + _handle->clearErr(); } bool File::err() const { @@ -211,12 +207,12 @@ bool DumpFile::isOpen() const { bool DumpFile::err() const { assert(_handle); - return _handle->ioFailed(); + return _handle->err(); } void DumpFile::clearErr() { assert(_handle); - _handle->clearIOFailed(); + _handle->clearErr(); } uint32 DumpFile::write(const void *ptr, uint32 len) { diff --git a/common/file.h b/common/file.h index 28c99e0e38..a98d23a96a 100644 --- a/common/file.h +++ b/common/file.h @@ -126,16 +126,27 @@ public: */ const char *getName() const { return _name.c_str(); } + /** + * DEPRECATED: Use err() or eos() instead. + * Returns true if any I/O failure occurred or the end of the + * stream was reached while reading. + */ bool ioFailed() const; + + /** + * DEPRECATED: Don't use this unless you are still using ioFailed(). + * Reset the I/O error status. + */ void clearIOFailed(); - bool err() const; - void clearErr(); - bool eos() const; - virtual int32 pos() const; - virtual int32 size() const; - bool seek(int32 offs, int whence = SEEK_SET); - uint32 read(void *dataPtr, uint32 dataSize); + bool err() const; // implement abstract Stream method + void clearErr(); // implement abstract Stream method + bool eos() const; // implement abstract SeekableReadStream method + + int32 pos() const; // implement abstract SeekableReadStream method + int32 size() const; // implement abstract SeekableReadStream method + bool seek(int32 offs, int whence = SEEK_SET); // implement abstract SeekableReadStream method + uint32 read(void *dataPtr, uint32 dataSize); // implement abstract SeekableReadStream method }; diff --git a/common/stream.h b/common/stream.h index b691567623..80e2978fb9 100644 --- a/common/stream.h +++ b/common/stream.h @@ -41,19 +41,6 @@ public: virtual ~Stream() {} /** - * DEPRECATED: Use err() or eos() instead. - * Returns true if any I/O failure occurred or the end of the - * stream was reached while reading. - */ - virtual bool ioFailed() const { return err(); } - - /** - * DEPRECATED: Don't use this unless you are still using ioFailed(). - * Reset the I/O error status. - */ - virtual void clearIOFailed() { clearErr(); } - - /** * Returns true if an I/O failure occurred. * This flag is never cleared automatically. In order to clear it, * client code has to call clearErr() explicitly. @@ -405,7 +392,7 @@ public: * Upon successful completion, return a string with the content * of the line, *without* the end of a line marker. This method * does not indicate whether an error occured. Callers must use - * ioFailed() or eos() to determine whether an exception occurred. + * err() or eos() to determine whether an exception occurred. */ virtual String readLine(); }; @@ -509,8 +496,6 @@ public: ~BufferedReadStream(); virtual bool eos() const { return (_pos == _bufSize) && _parentStream->eos(); } - virtual bool ioFailed() const { return _parentStream->ioFailed(); } - virtual void clearIOFailed() { _parentStream->clearIOFailed(); } virtual bool err() const { return _parentStream->err(); } virtual void clearErr() { _parentStream->clearErr(); } diff --git a/common/unzip.cpp b/common/unzip.cpp index 9d4ea9d26b..1b0a09deeb 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -372,7 +372,7 @@ typedef struct { *pi = (int)c; return UNZ_OK; } else { - if (fin.ioFailed()) + if (fin.err()) return UNZ_ERRNO; else return UNZ_EOF; @@ -385,12 +385,12 @@ typedef struct { */ static int unzlocal_getShort(Common::SeekableReadStream *fin, uLong *pX) { *pX = fin->readUint16LE(); - return fin->ioFailed() ? UNZ_ERRNO : UNZ_OK; + return (fin->err() || fin->eos()) ? UNZ_ERRNO : UNZ_OK; } static int unzlocal_getLong(Common::SeekableReadStream *fin, uLong *pX) { *pX = fin->readUint32LE(); - return fin->ioFailed() ? UNZ_ERRNO : UNZ_OK; + return (fin->err() || fin->eos()) ? UNZ_ERRNO : UNZ_OK; } @@ -433,7 +433,7 @@ static uLong unzlocal_SearchCentralDir(Common::SeekableReadStream &fin) { uLong uPosFound=0; uSizeFile = fin.size(); - if (fin.ioFailed()) + if (fin.err()) return 0; if (uMaxBack>uSizeFile) @@ -456,7 +456,7 @@ static uLong unzlocal_SearchCentralDir(Common::SeekableReadStream &fin) { uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); fin.seek(uReadPos, SEEK_SET); - if (fin.ioFailed()) + if (fin.err()) break; if (fin.read(buf,(uInt)uReadSize)!=uReadSize) @@ -510,7 +510,7 @@ unzFile unzOpen(Common::SeekableReadStream *stream) { err=UNZ_ERRNO; us->_stream->seek(central_pos, SEEK_SET); - if (us->_stream->ioFailed()) + if (us->_stream->err()) err=UNZ_ERRNO; /* the signature, already checked */ @@ -651,7 +651,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file, return UNZ_PARAMERROR; s=(unz_s*)file; s->_stream->seek(s->pos_in_central_dir+s->byte_before_the_zipfile, SEEK_SET); - if (s->_stream->ioFailed()) + if (s->_stream->err()) err=UNZ_ERRNO; @@ -735,7 +735,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file, if (lSeek!=0) { s->_stream->seek(lSeek, SEEK_CUR); - if (s->_stream->ioFailed()) + if (s->_stream->err()) lSeek=0; else err=UNZ_ERRNO; @@ -759,7 +759,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file, if (lSeek!=0) { s->_stream->seek(lSeek, SEEK_CUR); - if (s->_stream->ioFailed()) + if (s->_stream->err()) lSeek=0; else err=UNZ_ERRNO; @@ -917,7 +917,7 @@ static int unzlocal_CheckCurrentFileCoherencyHeader(unz_s* s, uInt* piSizeVar, s->_stream->seek(s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile, SEEK_SET); - if (s->_stream->ioFailed()) + if (s->_stream->err()) return UNZ_ERRNO; @@ -1121,7 +1121,7 @@ int unzReadCurrentFile(unzFile file, voidp buf, unsigned len) { return UNZ_EOF; pfile_in_zip_read_info->_stream->seek(pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile, SEEK_SET); - if (pfile_in_zip_read_info->_stream->ioFailed()) + if (pfile_in_zip_read_info->_stream->err()) return UNZ_ERRNO; if (pfile_in_zip_read_info->_stream->read(pfile_in_zip_read_info->read_buffer,uReadThis)!=uReadThis) return UNZ_ERRNO; @@ -1275,7 +1275,7 @@ int unzGetLocalExtrafield(unzFile file, voidp buf, unsigned len) { pfile_in_zip_read_info->_stream->seek(pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET); - if (pfile_in_zip_read_info->_stream->ioFailed()) + if (pfile_in_zip_read_info->_stream->err()) return UNZ_ERRNO; if (pfile_in_zip_read_info->_stream->read(buf,(uInt)size_to_read)!=size_to_read) @@ -1339,7 +1339,7 @@ int unzGetGlobalComment(unzFile file, char *szComment, uLong uSizeBuf) { uReadThis = s->gi.size_comment; s->_stream->seek(s->central_pos+22, SEEK_SET); - if (s->_stream->ioFailed()) + if (s->_stream->err()) return UNZ_ERRNO; if (uReadThis>0) { diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 8ebd24e6d9..ca8b47aded 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -1127,7 +1127,7 @@ void Mickey::saveGame() { outfile->finalize(); - if (outfile->ioFailed()) + if (outfile->err()) warning("Can't write file '%s'. (Disk full?)", szFile); diskerror = false; diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index ab9d59da3e..81305e9590 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -1161,7 +1161,7 @@ void Winnie::saveGame() { outfile->finalize(); - if (outfile->ioFailed()) + if (outfile->err()) warning("Can't write file '%s'. (Disk full?)", szFile); delete outfile; diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index a27da3053f..54159aa6fa 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -225,7 +225,7 @@ int AgiEngine::saveGame(const char *fileName, const char *description) { out->writeSint16BE(_gfx->getAGIPalFileNum()); out->finalize(); - if (out->ioFailed()) { + if (out->err()) { warning("Can't write file '%s'. (Disk full?)", fileName); result = errIOError; } else diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp index 2c6ff4dcae..ea0ff0079b 100644 --- a/engines/cine/saveload.cpp +++ b/engines/cine/saveload.cpp @@ -42,7 +42,7 @@ bool writeChunkHeader(Common::OutSaveFile &out, const ChunkHeader &header) { out.writeUint32BE(header.id); out.writeUint32BE(header.version); out.writeUint32BE(header.size); - return !out.ioFailed(); + return !out.err(); } bool loadChunkHeader(Common::SeekableReadStream &in, ChunkHeader &header) { diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index b9edb2decd..0df77b60e9 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -770,7 +770,7 @@ Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName) header.saveName = saveName; writeSavegameHeader(f, header); - if (f->ioFailed()) { + if (f->err()) { delete f; saveMan->removeSavefile(filename); return Common::kWritingFailed; diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 9745bb93fc..abf17d0e8e 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -253,7 +253,7 @@ void DrasculaEngine::saveGame(char gameName[]) { out->writeSint32LE(pickedObject); out->finalize(); - if (out->ioFailed()) + if (out->err()) warning("Can't write file '%s'. (Disk full?)", gameName); delete out; diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp index 0788dc70f9..1584cedc95 100644 --- a/engines/gob/saveload.cpp +++ b/engines/gob/saveload.cpp @@ -234,7 +234,7 @@ bool PlainSave::save(int16 dataVar, int32 size, int32 offset, const char *name, variables, variableSizes, _endianness); out->finalize(); - if (out->ioFailed()) { + if (out->err()) { warning("Can't write to file \"%s\"", name); retVal = false; } @@ -494,7 +494,7 @@ bool StagedSave::write() const { if (result) { out->finalize(); - if (out->ioFailed()) { + if (out->err()) { warning("Can't write to file \"%s\"", _name); result = false; } diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index a7187f6c76..f6302d39c1 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -197,7 +197,7 @@ Common::WriteStream *KyraEngine_v1::openSaveForWriting(const char *filename, con else out->writeUint32BE(GF_FLOPPY); - if (out->ioFailed()) { + if (out->err()) { warning("Can't write file '%s'. (Disk full?)", filename); delete out; return 0; diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 538931634e..6d7f9deda4 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -344,7 +344,7 @@ Common::Error QueenEngine::saveGameState(int slot, const char *desc) { file->finalize(); // check for errors - if (file->ioFailed()) { + if (file->err()) { warning("Can't write file '%s'. (Disk full?)", name); err = Common::kWritingFailed; } diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index aa10f56a9b..56fb366405 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -247,7 +247,7 @@ void SagaEngine::save(const char *fileName, const char *saveName) { out->finalize(); - if (out->ioFailed()) + if (out->err()) warning("Can't write file '%s'. (Disk full?)", fileName); delete out; diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp index dde437f268..a24e3eeb04 100644 --- a/engines/sky/control.cpp +++ b/engines/sky/control.cpp @@ -1087,7 +1087,7 @@ void Control::saveDescriptions(const Common::StringList &list) { outf->write(list[cnt].c_str(), list[cnt].size() + 1); } outf->finalize(); - if (!outf->ioFailed()) + if (!outf->err()) ioFailed = false; delete outf; } @@ -1114,7 +1114,7 @@ void Control::doAutoSave(void) { outf->write(saveData, fSize); outf->finalize(); - if (outf->ioFailed()) + if (outf->err()) displayMessage(0, "Unable to write autosave file '%s'. Disk full?", fName, _saveFileMan->popErrorDesc().c_str()); delete outf; @@ -1135,7 +1135,7 @@ uint16 Control::saveGameToFile(void) { uint32 writeRes = outf->write(saveData, fSize); outf->finalize(); - if (outf->ioFailed()) + if (outf->err()) writeRes = 0; free(saveData); delete outf; diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp index 6ad6e651ef..3f01177cec 100644 --- a/engines/sky/detection.cpp +++ b/engines/sky/detection.cpp @@ -262,7 +262,7 @@ void SkyMetaEngine::removeSaveState(const char *target, int slot) const { outf->write(savenames[cnt].c_str(), savenames[cnt].size() + 1); } outf->finalize(); - if (!outf->ioFailed()) + if (!outf->err()) ioFailed = false; delete outf; } diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index e016eaec13..9077e4f8c3 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -1140,7 +1140,7 @@ void Control::saveGameToFile(uint8 slot) { for (uint32 cnt2 = 0; cnt2 < playerSize; cnt2++) outf->writeUint32LE(playerRaw[cnt2]); outf->finalize(); - if (outf->ioFailed()) + if (outf->err()) displayMessage(0, "Couldn't write to file '%s'. Device full? (%s)", fName, _saveFileMan->popErrorDesc().c_str()); delete outf; } @@ -1288,7 +1288,7 @@ bool Control::convertSaveGame(uint8 slot, char* desc) { newSave->write(saveData, dataSize); newSave->finalize(); - if (newSave->ioFailed()) + if (newSave->err()) warning("Couldn't write to file '%s'. Device full?", newFileName); delete newSave; diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp index 4a8b0e9ab6..106bb97275 100644 --- a/engines/sword2/saveload.cpp +++ b/engines/sword2/saveload.cpp @@ -140,7 +140,7 @@ uint32 Sword2Engine::saveData(uint16 slotNo, byte *buffer, uint32 bufferSize) { out->write(buffer, bufferSize); out->finalize(); - if (!out->ioFailed()) { + if (!out->err()) { delete out; return SR_OK; } diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index b17ee93d4d..4d305e15cf 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -484,7 +484,7 @@ static void DoSave(void) { memcpy(hdr.desc, SaveSceneDesc, SG_DESC_LEN); hdr.desc[SG_DESC_LEN - 1] = 0; g_system->getTimeAndDate(hdr.dateTime); - if (!syncSaveGameHeader(s, hdr) || f->ioFailed()) { + if (!syncSaveGameHeader(s, hdr) || f->err()) { goto save_failure; } @@ -492,7 +492,7 @@ static void DoSave(void) { // Write out the special Id for Discworld savegames f->writeUint32LE(0xFEEDFACE); - if (f->ioFailed()) + if (f->err()) goto save_failure; f->finalize(); diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp index 3bbb1253f3..daf9d25ce8 100644 --- a/engines/touche/saveload.cpp +++ b/engines/touche/saveload.cpp @@ -334,7 +334,7 @@ Common::Error ToucheEngine::saveGameState(int num, const char *description) { f->write(headerDescription, kGameStateDescriptionLen); saveGameStateData(f); f->finalize(); - if (!f->ioFailed()) { + if (!f->err()) { saveOk = true; } else { warning("Can't write file '%s'", gameStateFileName.c_str()); diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp index ae16837ddf..2b23cf86e0 100644 --- a/engines/tucker/saveload.cpp +++ b/engines/tucker/saveload.cpp @@ -112,7 +112,7 @@ Common::Error TuckerEngine::saveGameState(int num, const char *description) { f->writeUint16LE(0); saveOrLoadGameStateData(*f); f->finalize(); - if (f->ioFailed()) { + if (f->err()) { warning("Can't write file '%s'", gameStateFileName.c_str()); ret = Common::kWritingFailed; } diff --git a/graphics/font.cpp b/graphics/font.cpp index f896b3c94e..1c958f3c3c 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -649,7 +649,7 @@ bool NewFont::cacheFontData(const NewFont &font, const Common::String &filename) cacheFile.writeByte(0); } - return !cacheFile.ioFailed(); + return !cacheFile.err(); } NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) { diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index a0457aed62..d662be989e 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -109,7 +109,7 @@ public: } bool writeBit8u(MT32Emu::Bit8u out) { _out.writeByte(out); - return !_out.ioFailed(); + return !_out.err(); } bool isEOF() { return _in.isOpen() && _in.eos(); |