|
|
Hotfix needed for new binutils (bug is in gcc) (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
--- ./libs/pbd/pbd/compose.h.orig 2004-08-13 15:35:23.000000000 +0200
+++ ./libs/pbd/pbd/compose.h 2004-08-13 15:38:37.000000000 +0200
@@ -75,39 +75,14 @@
// helper for converting spec string numbers inline int char_to_int(char c) { - switch (c) {
- case '0': return 0;
- case '1': return 1;
- case '2': return 2;
- case '3': return 3;
- case '4': return 4;
- case '5': return 5;
- case '6': return 6;
- case '7': return 7;
- case '8': return 8;
- case '9': return 9;
- default: return -1000;
- }
+ if ( c >= '0' && c <= '9' ) return c - '0';
+ return -1000;
} inline bool is_number(int n) { - switch (n) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- return true;
-
- default:
- return false;
- }
+ if ( n >= '0' && n <= '9' ) return true;
+ return false;
}
|