aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/key.cpp
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2021-01-04 15:29:36 +0000
committerIngo Klöcker <[email protected]>2021-01-04 15:30:41 +0000
commita6220adf3081c9c848f6d0a6fc3774cb168ccf9c (patch)
tree11eaee9f7290a3b3106d5ce68cc2a8112dc04957 /lang/cpp/src/key.cpp
parentQt: Undeprecate QByteArray based start functs (diff)
downloadgpgme-a6220adf3081c9c848f6d0a6fc3774cb168ccf9c.tar.gz
gpgme-a6220adf3081c9c848f6d0a6fc3774cb168ccf9c.zip
cpp: Add const-overload of UserID::Signature::operator<
lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::Signature::operator<): Add const-overload. Deprecate non-const overload. -- This fixes compilation on FreeBSD with clang 10.
Diffstat (limited to '')
-rw-r--r--lang/cpp/src/key.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index e536d080..f9cc2b60 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -867,6 +867,12 @@ UserID::Signature::Signature(const shared_gpgme_key_t &k, gpgme_user_id_t u, gpg
bool UserID::Signature::operator<(const Signature &other)
{
+ // kept for binary compatibility
+ return static_cast<const UserID::Signature *>(this)->operator<(other);
+}
+
+bool UserID::Signature::operator<(const Signature &other) const
+{
// based on cmp_signodes() in g10/keylist.c
// both signatures must belong to the same user ID