mirror of https://github.com/AxioDL/nod.git
Remove unnecessary and RVO-detrimental moves
This commit is contained in:
parent
38de2ec4a1
commit
d106299a11
|
@ -363,7 +363,7 @@ public:
|
|||
virtual ~DiscBuilderBase() {}
|
||||
DiscBuilderBase(const SystemChar* outPath, int64_t discCapacity,
|
||||
std::function<void(size_t idx, const SystemString&, size_t)> progressCB)
|
||||
: m_outPath(outPath), m_fileIO(std::move(NewFileIO(outPath, discCapacity))),
|
||||
: m_outPath(outPath), m_fileIO(NewFileIO(outPath, discCapacity)),
|
||||
m_discCapacity(discCapacity), m_progressCB(progressCB) {}
|
||||
|
||||
IFileIO& getFileIO() {return *m_fileIO;}
|
||||
|
|
|
@ -177,7 +177,7 @@ DirectoryEnumerator::DirectoryEnumerator(const SystemChar* path, Mode mode,
|
|||
else
|
||||
continue;
|
||||
|
||||
m_entries.push_back(std::move(Entry(std::move(fp), d->d_name, sz, isDir)));
|
||||
m_entries.push_back(Entry(std::move(fp), d->d_name, sz, isDir));
|
||||
}
|
||||
break;
|
||||
case Mode::DirsThenFilesSorted:
|
||||
|
|
|
@ -11,7 +11,7 @@ class DiscIOISO : public IDiscIO
|
|||
std::unique_ptr<IFileIO> m_fio;
|
||||
public:
|
||||
DiscIOISO(const SystemString& fpin)
|
||||
: m_fio(std::move(NewFileIO(fpin))) {}
|
||||
: m_fio(NewFileIO(fpin)) {}
|
||||
|
||||
class ReadStream : public IReadStream
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
std::unique_ptr<IReadStream> beginReadStream(uint64_t offset) const
|
||||
{
|
||||
return std::unique_ptr<IReadStream>(new ReadStream(std::move(m_fio->beginReadStream(offset))));
|
||||
return std::unique_ptr<IReadStream>(new ReadStream(m_fio->beginReadStream(offset)));
|
||||
}
|
||||
|
||||
class WriteStream : public IWriteStream
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
std::unique_ptr<IWriteStream> beginWriteStream(uint64_t offset) const
|
||||
{
|
||||
return std::unique_ptr<IWriteStream>(new WriteStream(std::move(m_fio->beginWriteStream(offset))));
|
||||
return std::unique_ptr<IWriteStream>(new WriteStream(m_fio->beginWriteStream(offset)));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue