Browse Source

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
reviewable/pr6030/r1
Anthony Bilinski 5 years ago
parent
commit
f53e44b62c
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/persistence/profile.cpp

2
src/persistence/profile.cpp

@ -117,7 +117,7 @@ std::unique_ptr<ToxEncrypt> loadToxData(const QString& password, const QString& @@ -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;

Loading…
Cancel
Save