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

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 Dec 2017 22:18:20 -0500 "George Mitchell" <george+freebsd@m5p=2Eco=
m> said

> On 12/19/17 22:12, Chris H wrote:
> > Apologies if this was better posted on ports@=2E But given the
> > circumstances, I thought this might be a better choice=2E :-)
> > OK I've been hacking on this port all day=2E I've silenced all
> > the warnings, and errors; save one:
> >=20
> > ImageEventBox=2Ecpp: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=2E But I'm stuck=2E Please help=2E
> >=20
> > Thanks!
> >=20
> > --Chris
> > [=2E=2E=2E]
>=20
> Glib::RefPtr can't be compared to an integer=2E  Compare it to NULL (or
> nullptr in C++11)=2E  Or implicitly convert it to bool:
Yep=2E it's c++11
>=20
> if(ImagePixbuf_Original && loaded =3D=3D true)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I *knew* I was over complicating things=2E That was it, George=2E
Thank you, thank you, thank you=2E

--Chris

>=20
> -- George





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18f92fc762e48211b4ad967afa0f2ad3>