Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2017 22:18:20 -0500
From:      George Mitchell <george+freebsd@m5p.com>
To:        bsd-lists@BSDforge.com, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: error: invalid operands to binary expression
Message-ID:  <99287b7a-b922-f161-f05e-34d2db27d301@m5p.com>
In-Reply-To: <ea7e94dfb4461cd6cfb932be984dbcc6@udns.ultimatedns.net>
References:  <ea7e94dfb4461cd6cfb932be984dbcc6@udns.ultimatedns.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--9TP6ywOODsvxSYsESI8rWB5JmwelRS02r
Content-Type: multipart/mixed; boundary="wiVfL4bC3LPI8GBy0J5hXDpEX3BtOjwmZ";
 protected-headers="v1"
From: George Mitchell <george+freebsd@m5p.com>
To: bsd-lists@BSDforge.com, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Message-ID: <99287b7a-b922-f161-f05e-34d2db27d301@m5p.com>
Subject: Re: error: invalid operands to binary expression
References: <ea7e94dfb4461cd6cfb932be984dbcc6@udns.ultimatedns.net>
In-Reply-To: <ea7e94dfb4461cd6cfb932be984dbcc6@udns.ultimatedns.net>

--wiVfL4bC3LPI8GBy0J5hXDpEX3BtOjwmZ
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 12/19/17 22:12, Chris H wrote:
> Apologies if this was better posted on ports@. 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:
>=20
> ImageEventBox.cpp:152:26: error: invalid operands to binary expression
> ('Glib::RefPtr<Gdk::Pixbuf>' and 'int')
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if(ImagePixbuf_Original !=3D 0 && =
loaded =3D=3D true)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ~~~~~~~~~~~~~~~~=
~~~~ ^=C2=A0 ~
>=20
> This *should* be easy to deal with, and I'm probably just over
> complicating it. But I'm stuck. Please help.
>=20
> Thanks!
>=20
> --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 =3D=3D true)

-- George


--wiVfL4bC3LPI8GBy0J5hXDpEX3BtOjwmZ--

--9TP6ywOODsvxSYsESI8rWB5JmwelRS02r
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEENdM4ZHktsJW5kKZXwRES3m+p4fkFAlo51oMACgkQwRES3m+p
4fkEfxAAjTDN+foQtKHnOL+HzzvX2+nKuADYeMftty9UbOnk2hR+vym2BWfeWY5q
WCISR3mIm0E3L2Q5H2oUjSNbXRAkrovV4Zaj86r6Hgo6/n6wUixZpztymod9lO1Q
YIxxwv/uHJU1yEujnPP8ovCxGwVL4wjHDuHTci3f71hRVHawXBRH44Q41ar77MP0
199jUH+LserrsYSsVnSEC15ZWbEp7MbostGgv2o9qdMoUTBepfPLiNpyEu6CbBkm
GKN6t5Pzz/YnjJxqoQff5btENqe5lkpZg5QGqjRNkoBtoX8L3Jnv2HkQxAUW3cNj
sGvgTAfn6xsgreeXwzJ99lT0+dQRf6vW793JfVmb/5qUS0WcW+OLI7k/yz0KmXVr
5Mbvx7xIKVRUXVoO68zkIM/5PvTEvd4EW2jYGRZg1nGb/XwAwNQgEk/jTx/6Z1/y
ZGUj1n28KuRq+I/0lgUJZHaMGBsGEoPEJwqKutPM8o9QqIXeG/JtQHCG3O2glcz5
4r26MgKTTnIENNRQSxNZKegSNvSYwAduxSWOEO725AOenUu/Qa3FFfwyz1wJbHxN
rDdFDTNlm5HiMueX8f8AiMX5gOehLEEcCFCixxydraQ9oY1ye89bglN0Xn51R5a1
cd9ngQ2lja20Y9DxfCIpFBbM8mLbSvnl3Q0TLg338H9qjoabq5Y=
=TwnJ
-----END PGP SIGNATURE-----

--9TP6ywOODsvxSYsESI8rWB5JmwelRS02r--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99287b7a-b922-f161-f05e-34d2db27d301>