Avoid creation of a temporary object.

This commit is contained in:
Bartosz Taudul 2024-02-09 01:27:33 +01:00
parent 5037742ab0
commit 5e4eae5c2e
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -14,7 +14,7 @@ TaskDispatch::TaskDispatch( size_t workers, const char* name )
m_workers.reserve( workers );
for( size_t i=0; i<workers; i++ )
{
m_workers.emplace_back( std::thread( [this, name, i]{ SetName( name, i ); Worker(); } ) );
m_workers.emplace_back( [this, name, i]{ SetName( name, i ); Worker(); } );
}
}