diff options
author | Vas Crabb <cuavas@users.noreply.github.com> | 2021-08-22 09:06:15 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 09:06:15 +1000 |
commit | e8bbea1fc6e94e14768509d322f6c624403ffb36 (patch) | |
tree | 74dd1606a900d83de8aecff17a6737af4113308d /src/frontend/mame/cheat.cpp | |
parent | e319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff) |
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter.
unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename.
Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums.
Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/frontend/mame/cheat.cpp')
-rw-r--r-- | src/frontend/mame/cheat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp index bc266cc6aae..f4a567db28f 100644 --- a/src/frontend/mame/cheat.cpp +++ b/src/frontend/mame/cheat.cpp @@ -1191,10 +1191,10 @@ bool cheat_manager::save_all(std::string const &filename) { // open the file with the proper name emu_file cheatfile(machine().options().cheat_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); - osd_file::error const filerr(cheatfile.open(filename + ".xml")); + std::error_condition const filerr(cheatfile.open(filename + ".xml")); // if that failed, return nothing - if (filerr != osd_file::error::NONE) + if (filerr) return false; // wrap the rest of catch errors @@ -1391,7 +1391,7 @@ void cheat_manager::load_cheats(std::string const &filename) try { // loop over all instrances of the files found in our search paths - for (osd_file::error filerr = cheatfile.open(filename + ".xml"); filerr == osd_file::error::NONE; filerr = cheatfile.open_next()) + for (std::error_condition filerr = cheatfile.open(filename + ".xml"); !filerr; filerr = cheatfile.open_next()) { osd_printf_verbose("Loading cheats file from %s\n", cheatfile.fullpath()); |