From owner-freebsd-hackers@freebsd.org Wed Dec 20 03:56:31 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D48FDE90E6B for ; Wed, 20 Dec 2017 03:56:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4DC57AB85 for ; Wed, 20 Dec 2017 03:56:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id vBK3wNcP069509; Tue, 19 Dec 2017 19:58:29 -0800 (PST) (envelope-from bsd-lists@BSDforge.com) X-Mailer: UDNSMS MIME-Version: 1.0 Cc: "FreeBSD Hackers" In-Reply-To: <99287b7a-b922-f161-f05e-34d2db27d301@m5p.com> From: "Chris H" Reply-To: bsd-lists@BSDforge.com To: "George Mitchell" Subject: Re: error: invalid operands to binary expression Date: Tue, 19 Dec 2017 19:58:29 -0800 Message-Id: <18f92fc762e48211b4ad967afa0f2ad3@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2017 03:56:31 -0000 On Tue, 19 Dec 2017 22:18:20 -0500 "George Mitchell" 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' 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