error: invalid operands to binary expression
George Mitchell
george+freebsd at m5p.com
Wed Dec 20 03:19:08 UTC 2017
On 12/19/17 22:12, Chris H wrote:
> Apologies if this was better posted on ports at . But given the
> circumstances, I thought this might be a better choice. :-)
> OK I've been hacking on this port all day. I've silenced all
> the warnings, and errors; save one:
>
> ImageEventBox.cpp:152:26: error: invalid operands to binary expression
> ('Glib::RefPtr<Gdk::Pixbuf>' and 'int')
> if(ImagePixbuf_Original != 0 && loaded == true)
> ~~~~~~~~~~~~~~~~~~~~ ^ ~
>
> This *should* be easy to deal with, and I'm probably just over
> complicating it. But I'm stuck. Please help.
>
> Thanks!
>
> --Chris
> [...]
Glib::RefPtr can't be compared to an integer. Compare it to NULL (or
nullptr in C++11). Or implicitly convert it to bool:
if(ImagePixbuf_Original && loaded == true)
-- George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20171219/44053339/attachment.sig>
More information about the freebsd-hackers
mailing list