Bug#385521: langdrill: Remove use of minimum/maximum operator
Mark Brown
broonie at sirena.org.uk
Sun Jul 15 12:01:47 UTC 2007
tag 385521 + patch
thanks
The enclosed patch removes the use of the obsolete minimum operator,
allowing langdrill to build with GCC 4.2.
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
-------------- next part --------------
The minimum and maximum operators were never terribly portable and have
been dropped by GCC 4.2.
Index: langdrill-0.3/src/main.cc
===================================================================
--- langdrill-0.3.orig/src/main.cc 2007-07-15 12:52:38.000000000 +0100
+++ langdrill-0.3/src/main.cc 2007-07-15 12:54:01.000000000 +0100
@@ -460,9 +460,11 @@
// keys. In such a case, we must take some precations
setActiveButtons( keyTotalNr );
- // is this minimum operator portable ??
- // it should work with egcs at least !!
- int cols = keyTotalNr <? atoi(_setup.quizzAnswerNr);
+ int cols;
+ if (keyTotalNr < atoi(_setup.quizzAnswerNr))
+ cols = keyTotalNr;
+ else
+ cols = atoi(_setup.quizzAnswerNr);
int rows = keyTotalNr;
int *set = new int[cols];
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20070715/b395c1d8/attachment.pgp
More information about the Pkg-games-devel
mailing list