mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-23 00:10:37 -05:00
Reduce unnecessary copies using move semantics
This commit is contained in:
parent
896a66e6d8
commit
379c41d20c
10 changed files with 24 additions and 13 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue