Missing const in Signature::operator<

Ingo Klöcker kloecker at kde.org
Wed Dec 30 19:50:15 CET 2020


On Mittwoch, 30. Dezember 2020 14:56:45 CET Adriaan de Groot wrote:
> [ BCC'ed to Ingo (maintainer) and Jason (FreeBSD maintainer) ]
[ Not BCC'ed Jason because I don't know the email address. ]

> In 6a6d2a27648, Signature got an operator<, so that Signatures can be
> sorted. This is used in libkleo, for instance, to sort the signatures for
> display.
> 
> +    bool operator<(const Signature &other);
> 
> That should be const, though?

Yeah, should've been const.

> I have bunged in a const in the obvious spot, a patch is at https://
> invent.kde.org/-/snippets/1437 . I have test-built libkleo against a gpgmepp
> patched this way on FreeBSD, and this compile failure is then repaired.

Unfortunately, making a member function const is not BC. I'll add a const 
overload instead.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20201230/aa1e244b/attachment.sig>


More information about the Gnupg-devel mailing list