Mailing List Archive

Re: Missing const in Signature::operator<
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
Re: Missing const in Signature::operator< [ In reply to ]
On Mittwoch, 30. Dezember 2020 19:50:15 CET Ingo Kl?cker wrote:
> On Mittwoch, 30. Dezember 2020 14:56:45 CET Adriaan de Groot wrote:
> > 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.

Done in master (a6220adf3081c9c848f6d0a6fc3774cb168ccf9c).

Regards,
Ingo




_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel