mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
keys: CompositeKey: Change Q_FOREACH to C++11 for()
* Use the C++11 range based loop as recommended from https://github.com/keepassxreboot/keepassxc/pull/119 Signed-off-by: Kyle Manna <kyle@kylemanna.com>
This commit is contained in:
parent
d398d367c1
commit
ef06165ea2
@ -70,7 +70,7 @@ CompositeKey& CompositeKey::operator=(const CompositeKey& key)
|
||||
for (const Key* subKey : asConst(key.m_keys)) {
|
||||
addKey(*subKey);
|
||||
}
|
||||
Q_FOREACH (const ChallengeResponseKey* subKey, key.m_challengeResponseKeys) {
|
||||
for (const ChallengeResponseKey* subKey : asConst(key.m_challengeResponseKeys)) {
|
||||
addChallengeResponseKey(*subKey);
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ bool CompositeKey::challenge(const QByteArray& seed, QByteArray& result) const
|
||||
|
||||
CryptoHash cryptoHash(CryptoHash::Sha256);
|
||||
|
||||
Q_FOREACH (ChallengeResponseKey* key, m_challengeResponseKeys) {
|
||||
for (ChallengeResponseKey* key : m_challengeResponseKeys) {
|
||||
/* If the device isn't present or fails, return an error */
|
||||
if (key->challenge(seed) == false) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user