Re: Missing const in Signature::operator<

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Missing const in Signature::operator<

Ingo Klöcker
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

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Missing const in Signature::operator<

Ingo Klöcker
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
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel