cpp: Minor optimization in remark lookup
* lang/cpp/src/key.cpp (UserID::remark): Use C-API. -- The other parts of that function already use the C API so we can also avoid function calls for the keyListMode.
This commit is contained in:
parent
266e05eee8
commit
174caaa6f5
@ -753,8 +753,12 @@ const char *UserID::remark(const Key &remarker, Error &err) const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(parent().keyListMode() & GPGME_KEYLIST_MODE_SIG_NOTATIONS) ||
|
if (key->protocol != GPGME_PROTOCOL_OpenPGP) {
|
||||||
!(parent().keyListMode() & GPGME_KEYLIST_MODE_SIGS)) {
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(key->keylist_mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS) ||
|
||||||
|
!(key->keylist_mode & GPGME_KEYLIST_MODE_SIGS)) {
|
||||||
err = Error::fromCode(GPG_ERR_NO_DATA);
|
err = Error::fromCode(GPG_ERR_NO_DATA);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user