hecl/hecl: Make Entry take SystemString by value and move it

This allows callers to move into the constructor and subsequently move
into the member variable, avoiding copies altogether.
This commit is contained in:
Lioncash 2019-08-15 02:02:42 -04:00
parent dae3e6123f
commit 92b87676c2
1 changed files with 2 additions and 2 deletions

View File

@ -514,8 +514,8 @@ public:
size_t m_fileSz;
bool m_isDir;
Entry(const hecl::SystemString& path, const hecl::SystemChar* name, size_t sz, bool isDir)
: m_path(path), m_name(name), m_fileSz(sz), m_isDir(isDir) {}
Entry(hecl::SystemString path, const hecl::SystemChar* name, size_t sz, bool isDir)
: m_path(std::move(path)), m_name(name), m_fileSz(sz), m_isDir(isDir) {}
};
private: