Commit 4e96ade3 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Fix equality operator of Card

* Check members in their declaration order
* Access members of other directly
* Add missing members

GnuPG-bug-id: 4876
parent 93091020
......@@ -197,13 +197,20 @@ void Card::setCanLearnKeys(bool value)
bool Card::operator == (const Card &other) const
{
return mStatus == other.status()
&& mSerialNumber == other.serialNumber()
&& mAppName == other.appName()
&& mAppVersion == other.appVersion()
&& mPinStates == other.pinStates()
&& mCanLearn == other.canLearnKeys()
&& mHasNullPin == other.hasNullPin()
return mCanLearn == other.mCanLearn
&& mHasNullPin == other.mHasNullPin
&& mStatus == other.mStatus
&& mSerialNumber == other.mSerialNumber
&& mAppName == other.mAppName
&& mAppVersion == other.mAppVersion
&& mCardType == other.mCardType
&& mCardVersion == other.mCardVersion
&& mCardHolder == other.mCardHolder
&& mSigningKeyRef == other.mSigningKeyRef
&& mEncryptionKeyRef == other.mEncryptionKeyRef
&& mPinStates == other.mPinStates
&& mErrMsg == other.mErrMsg
&& mKeyInfos == other.mKeyInfos
&& mCardInfo == other.mCardInfo;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment