mirror of https://github.com/AxioDL/nod.git
DiscBase: std::move std::function instance
std::function isn't a trivial type (it's allowed to heap allocate to store any necessary captures), so we can move it in the constructor to avoid any unnecessary allocations
This commit is contained in:
parent
f443b60bde
commit
4bba7af2c2
|
@ -457,7 +457,7 @@ public:
|
|||
: m_outPath(outPath)
|
||||
, m_fileIO(NewFileIO(outPath, discCapacity))
|
||||
, m_discCapacity(discCapacity)
|
||||
, m_progressCB(progressCB) {}
|
||||
, m_progressCB(std::move(progressCB)) {}
|
||||
DiscBuilderBase(DiscBuilderBase&&) = default;
|
||||
DiscBuilderBase& operator=(DiscBuilderBase&&) = default;
|
||||
|
||||
|
|
Loading…
Reference in New Issue