ports/117319: [patch] games/xlogical bad C++ code w/ gcc4.2
Pietro Cerutti
gahr at gahr.ch
Fri Oct 19 16:10:03 UTC 2007
The following reply was made to PR ports/117319; it has been noted by GNATS.
From: Pietro Cerutti <gahr at gahr.ch>
To: Sergio Mangialardi <sergio at softshark.org>, bug-followup at FreeBSD.org,
gahr at gahr.ch
Cc:
Subject: Re: ports/117319: [patch] games/xlogical bad C++ code w/ gcc4.2
Date: Fri, 19 Oct 2007 18:03:18 +0200
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigAB05CAD746CC7F08203BD4F9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Sergio Mangialardi wrote:
> Pietro Cerutti wrote:
>>
>> - currentMap =3D NULL;
>> + currentMap =3D (list< class Clevel_map *>::iterator)NULL;
> I'm sorry, but in my opinion this isn't correct. There is no general wa=
y
> to initialize an iterator to NULL because iterators are not pointers
> (even though iterators are often implemented by pointers).
> currentMap should be set to the end of the container to which the
> iterator belongs.
>=20
> Sergio.
You are right. Please comment on this one:
--- gamelogic.cpp.orig 2007-10-19 17:52:30.000000000 +0200
+++ gamelogic.cpp 2007-10-19 17:53:15.000000000 +0200
@@ -154,7 +154,7 @@
levelFile =3D NULL;
}
- currentMap =3D NULL;
+ currentMap =3D gameLevels.end( );
playerName =3D new char[32+1];
strcpy( playerName, "nobody" );
--=20
Pietro Cerutti
PGP Public Key:
http://gahr.ch/pgp
--------------enigAB05CAD746CC7F08203BD4F9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
iD8DBQFHGNVLwMJqmJVx944RCgLiAJ9zDruuZmTQVB4GJvrZoRUXbsWovwCgy9SA
4fCV5AcpXn15Wm4owJBt3OQ=
=lOa+
-----END PGP SIGNATURE-----
--------------enigAB05CAD746CC7F08203BD4F9--
More information about the freebsd-ports-bugs
mailing list