mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-03 10:35:51 +00:00
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…
x
Reference in New Issue
Block a user