010_min_max.diff 782 B

12345678910111213141516171819202122
  1. The minimum and maximum operators were never terribly portable and have
  2. been dropped by GCC 4.2.
  3. Index: langdrill-0.3/src/main.cc
  4. ===================================================================
  5. --- langdrill-0.3.orig/src/main.cc 2007-07-15 12:52:38.000000000 +0100
  6. +++ langdrill-0.3/src/main.cc 2007-07-15 12:54:01.000000000 +0100
  7. @@ -460,9 +460,11 @@
  8. // keys. In such a case, we must take some precations
  9. setActiveButtons( keyTotalNr );
  10. - // is this minimum operator portable ??
  11. - // it should work with egcs at least !!
  12. - int cols = keyTotalNr <? atoi(_setup.quizzAnswerNr);
  13. + int cols;
  14. + if (keyTotalNr < atoi(_setup.quizzAnswerNr))
  15. + cols = keyTotalNr;
  16. + else
  17. + cols = atoi(_setup.quizzAnswerNr);
  18. int rows = keyTotalNr;
  19. int *set = new int[cols];