diff --git a/src/lib/formats/fs_oric_jasmin.cpp b/src/lib/formats/fs_oric_jasmin.cpp index 28c13ab634f..361f40332ea 100644 --- a/src/lib/formats/fs_oric_jasmin.cpp +++ b/src/lib/formats/fs_oric_jasmin.cpp @@ -286,10 +286,10 @@ std::vector impl::root_dir::contents() std::string fname = read_file_name(bdir.rodata()+off+3); bool system = ref == 0 && id == 0 && bdir.r32b(off+0xb) == 0x2e535953; if(system) - res.emplace_back(dir_entry(fname, dir_entry_type::system_file, 0)); + res.emplace_back(dir_entry(std::move(fname), dir_entry_type::system_file, 0)); else if(m_fs.ref_valid(ref)) - res.emplace_back(dir_entry(fname, dir_entry_type::file, id)); + res.emplace_back(dir_entry(std::move(fname), dir_entry_type::file, id)); id++; } diff --git a/src/lib/formats/fs_prodos.cpp b/src/lib/formats/fs_prodos.cpp index df13d0a4caa..2ce67301999 100644 --- a/src/lib/formats/fs_prodos.cpp +++ b/src/lib/formats/fs_prodos.cpp @@ -351,9 +351,9 @@ std::vector impl::root_dir::contents() auto name = blk.rstr(off+1, type & 0xf); type >>= 4; if(type == 0xd) - res.emplace_back(dir_entry(name, dir_entry_type::dir, id)); + res.emplace_back(dir_entry(std::move(name), dir_entry_type::dir, id)); else if(type != 0) - res.emplace_back(dir_entry(name, dir_entry_type::file, id)); + res.emplace_back(dir_entry(std::move(name), dir_entry_type::file, id)); off += 39; id ++; } diff --git a/src/lib/formats/fs_vtech.cpp b/src/lib/formats/fs_vtech.cpp index e294e657801..7b8edf53f63 100644 --- a/src/lib/formats/fs_vtech.cpp +++ b/src/lib/formats/fs_vtech.cpp @@ -137,7 +137,7 @@ std::vector vtech_image::impl::root_dir::contents() if(bdir.r8(off+1) != ':') continue; std::string fname = trim_end_spaces(bdir.rstr(off+2, 8)); - res.emplace_back(dir_entry(fname, dir_entry_type::file, id)); + res.emplace_back(dir_entry(std::move(fname), dir_entry_type::file, id)); id++; } } diff --git a/src/lib/formats/fsmgr.h b/src/lib/formats/fsmgr.h index 9859f929e9d..201dfe389bb 100644 --- a/src/lib/formats/fsmgr.h +++ b/src/lib/formats/fsmgr.h @@ -126,7 +126,7 @@ struct dir_entry { dir_entry_type m_type; u64 m_key; - dir_entry(const std::string &name, dir_entry_type type, u64 key) : m_name(name), m_type(type), m_key(key) {} + dir_entry(std::string &&name, dir_entry_type type, u64 key) : m_name(std::move(name)), m_type(type), m_key(key) {} }; class fsblk_t {