mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-28 12:57:03 -08:00
Reduce unnecessary copies using move semantics
This commit is contained in:
10 files changed
+24
-13
No files matched your search
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "HmacBlockStream.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "core/Endian.h"
|
||||
#include "crypto/CryptoHash.h"
|
||||
|
||||
@@ -25,7 +27,7 @@ const QSysInfo::Endian HmacBlockStream::ByteOrder = QSysInfo::LittleEndian;
|
||||
HmacBlockStream::HmacBlockStream(QIODevice* baseDevice, QByteArray key)
|
||||
: LayeredStream(baseDevice)
|
||||
, m_blockSize(1024 * 1024)
|
||||
, m_key(key)
|
||||
, m_key(std::move(key))
|
||||
{
|
||||
init();
|
||||
}
|
||||
@@ -33,7 +35,7 @@ HmacBlockStream::HmacBlockStream(QIODevice* baseDevice, QByteArray key)
|
||||
HmacBlockStream::HmacBlockStream(QIODevice* baseDevice, QByteArray key, qint32 blockSize)
|
||||
: LayeredStream(baseDevice)
|
||||
, m_blockSize(blockSize)
|
||||
, m_key(key)
|
||||
, m_key(std::move(key))
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user