mirror of https://github.com/AxioDL/metaforce.git
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:
parent
dae3e6123f
commit
92b87676c2
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue