diff options
Diffstat (limited to 'src/emu/fileio.cpp')
-rw-r--r-- | src/emu/fileio.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 6149e65a048..a1c983da39f 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -135,7 +135,7 @@ bool path_iterator::next(std::string &buffer, const char *name) //------------------------------------------------- -// path_iteratr::reset - let's go again +// path_iterator::reset - let's go again //------------------------------------------------- void path_iterator::reset() @@ -255,16 +255,16 @@ emu_file::operator util::core_file &() // hash - returns the hash for a file //------------------------------------------------- -util::hash_collection &emu_file::hashes(const char *types) +util::hash_collection &emu_file::hashes(std::string_view types) { // determine the hashes we already have std::string already_have = m_hashes.hash_types(); // determine which hashes we need std::string needed; - for (const char *scan = types; *scan != 0; scan++) - if (already_have.find_first_of(*scan) == -1) - needed.push_back(*scan); + for (char scan : types) + if (already_have.find_first_of(scan) == -1) + needed.push_back(scan); // if we need nothing, skip it if (needed.empty()) @@ -298,10 +298,10 @@ util::hash_collection &emu_file::hashes(const char *types) // open - open a file by searching paths //------------------------------------------------- -osd_file::error emu_file::open(const std::string &name) +osd_file::error emu_file::open(std::string &&name) { // remember the filename and CRC info - m_filename = name; + m_filename = std::move(name); m_crc = 0; m_openflags &= ~OPEN_FLAG_HAS_CRC; @@ -310,10 +310,10 @@ osd_file::error emu_file::open(const std::string &name) return open_next(); } -osd_file::error emu_file::open(const std::string &name, u32 crc) +osd_file::error emu_file::open(std::string &&name, u32 crc) { // remember the filename and CRC info - m_filename = name; + m_filename = std::move(name); m_crc = crc; m_openflags |= OPEN_FLAG_HAS_CRC; |