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:
Lioncash 2019-09-05 21:52:40 -04:00
parent f443b60bde
commit 4bba7af2c2
1 changed files with 1 additions and 1 deletions

View File

@ -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;