From 1d9f46ebc5689ff6895871981b84b00275539025 Mon Sep 17 00:00:00 2001 From: Gianluca Recchia Date: Wed, 24 Oct 2018 14:09:12 +0200 Subject: [PATCH] Fix the position of the Q_REQUIRED_RESULT macro (#2411) The Q_REQUIRED_RESULT macro was appended to a few method declarations. It should've been prepended instead. --- src/crypto/kdf/AesKdf.h | 4 ++-- src/crypto/kdf/Argon2Kdf.h | 4 ++-- src/keys/CompositeKey.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crypto/kdf/AesKdf.h b/src/crypto/kdf/AesKdf.h index 20ef5c47..84156e6f 100644 --- a/src/crypto/kdf/AesKdf.h +++ b/src/crypto/kdf/AesKdf.h @@ -35,8 +35,8 @@ protected: int benchmarkImpl(int msec) const override; private: - static bool - transformKeyRaw(const QByteArray& key, const QByteArray& seed, int rounds, QByteArray* result) Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT static bool + transformKeyRaw(const QByteArray& key, const QByteArray& seed, int rounds, QByteArray* result); }; #endif // KEEPASSX_AESKDF_H diff --git a/src/crypto/kdf/Argon2Kdf.h b/src/crypto/kdf/Argon2Kdf.h index 9449f345..2f029a57 100644 --- a/src/crypto/kdf/Argon2Kdf.h +++ b/src/crypto/kdf/Argon2Kdf.h @@ -45,13 +45,13 @@ protected: quint32 m_parallelism; private: - static bool transformKeyRaw(const QByteArray& key, + Q_REQUIRED_RESULT static bool transformKeyRaw(const QByteArray& key, const QByteArray& seed, quint32 version, quint32 rounds, quint64 memory, quint32 parallelism, - QByteArray& result) Q_REQUIRED_RESULT; + QByteArray& result); }; #endif // KEEPASSX_ARGON2KDF_H diff --git a/src/keys/CompositeKey.h b/src/keys/CompositeKey.h index d81c4698..43c624ac 100644 --- a/src/keys/CompositeKey.h +++ b/src/keys/CompositeKey.h @@ -39,7 +39,7 @@ public: QByteArray rawKey() const override; QByteArray rawKey(const QByteArray* transformSeed, bool* ok = nullptr) const; - bool transform(const Kdf& kdf, QByteArray& result) const Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT bool transform(const Kdf& kdf, QByteArray& result) const; bool challenge(const QByteArray& seed, QByteArray& result) const; void addKey(QSharedPointer key);