1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(cleanup): don't std::move for return statement

std::moveing prevents RVO, and even in cases where RVO can't take place, move
will be used if possible.

Fix #6011
This commit is contained in:
Anthony Bilinski 2020-03-22 01:37:31 -07:00
parent 70824729ff
commit f53e44b62c
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -117,7 +117,7 @@ std::unique_ptr<ToxEncrypt> loadToxData(const QString& password, const QString&
saveFile.close();
error = LoadToxDataError::OK;
return std::move(tmpKey);
return tmpKey;
fail:
saveFile.close();
return nullptr;