mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.0 KiB

  1. Hotfix needed for new binutils (bug is in gcc)
  2. (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
  3. --- ./libs/pbd/pbd/compose.h.orig 2004-08-13 15:35:23.000000000 +0200
  4. +++ ./libs/pbd/pbd/compose.h 2004-08-13 15:38:37.000000000 +0200
  5. @@ -75,39 +75,14 @@
  6. // helper for converting spec string numbers
  7. inline int char_to_int(char c)
  8. {
  9. - switch (c) {
  10. - case '0': return 0;
  11. - case '1': return 1;
  12. - case '2': return 2;
  13. - case '3': return 3;
  14. - case '4': return 4;
  15. - case '5': return 5;
  16. - case '6': return 6;
  17. - case '7': return 7;
  18. - case '8': return 8;
  19. - case '9': return 9;
  20. - default: return -1000;
  21. - }
  22. + if ( c >= '0' && c <= '9' ) return c - '0';
  23. + return -1000;
  24. }
  25. inline bool is_number(int n)
  26. {
  27. - switch (n) {
  28. - case '0':
  29. - case '1':
  30. - case '2':
  31. - case '3':
  32. - case '4':
  33. - case '5':
  34. - case '6':
  35. - case '7':
  36. - case '8':
  37. - case '9':
  38. - return true;
  39. -
  40. - default:
  41. - return false;
  42. - }
  43. + if ( n >= '0' && n <= '9' ) return true;
  44. + return false;
  45. }