Reduce unnecessary copies using move semantics

This commit is contained in:
Gianluca Recchia 2018-10-28 16:13:58 +01:00
parent 896a66e6d8
commit 379c41d20c
No known key found for this signature in database
GPG key ID: 3C2B4128D9A1F218
10 changed files with 24 additions and 13 deletions

View file

@ -29,6 +29,7 @@
#include <QDebug>
#include <QDir>
#include <QRegularExpression>
#include <utility>
const int Entry::DefaultIconNumber = 0;
const int Entry::ResolveMaximumDepth = 10;
@ -367,7 +368,7 @@ QString Entry::totp() const
void Entry::setTotp(QSharedPointer<Totp::Settings> settings)
{
beginUpdate();
m_data.totpSettings = settings;
m_data.totpSettings = std::move(settings);
auto text = Totp::writeSettings(m_data.totpSettings, title(), username());
if (m_attributes->hasKey(Totp::ATTRIBUTE_OTP)) {