Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2009 18:09:07 -0700
From:      Norbert Papke <npapke@acm.org>
To:        freebsd-x11@freebsd.org
Subject:   Re: Problem with OpenGL and ATI HD3850
Message-ID:  <200904291809.08025.npapke@acm.org>
In-Reply-To: <20090429163843.GB370@slackbox.xs4all.nl>
References:  <20090429164113.f0b48048.lehmann@ans-netz.de> <20090429163843.GB370@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On April 29, 2009, Roland Smith wrote:
> > =A0 =A0 =A0 =A0 assert(pcVer && "Problems getting GL version string usi=
ng
> > glGetString"); printf("ogre 110.1\n");
>
> The assert is weird. Why take an AND of pcVer and a string? Since the
> string is a constant non-null value, using the standard && operator is
> useless. Is the && operator overloaded by any chance? That could cause the
> trouble.

You are correct.  However. the most likely reason for including the string=
=20
inside the assert() macro is for diagnostics.  If pcVer were false, the mac=
ro=20
would cause something like the following to be written to stderr:

  Assertion failed: pcVer && "Problems getting GL version string ussing=20
glGetString", ...

Cheers,
=20
=2D- Norbert Papke.
   npapke@acm.org



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