[beast] BSE: fix bseloader-bsewave.cc for g++-4.4



commit 7b6e12e9d8865f164ed6105f836445e7af6a3731
Author: Stefan Westerfeld <stefan space twc de>
Date:   Mon Aug 1 16:55:50 2011 +0200

    BSE: fix bseloader-bsewave.cc for g++-4.4
    
    For some reason, g++-4.4 will not convert the token value of an enum to the
    "right" number if the enum is converted to an uint; it does work for enum->int,
    though. So this change will make the bsewave parser work for g++-4.4; I'm not
    sure whether this is a compiler bug, or whether the C++ language specification
    allows the behaviour g++-4.4 exposes (the old code before this commit passes
    the testsuite when compiled with g++-4.5, but breaks it for g++-4.4).

 bse/bseloader-bsewave.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/bse/bseloader-bsewave.cc b/bse/bseloader-bsewave.cc
index a2c4a96..f53c8e5 100644
--- a/bse/bseloader-bsewave.cc
+++ b/bse/bseloader-bsewave.cc
@@ -423,7 +423,8 @@ bsewave_parse_wave_dsc (GScanner   *scanner,
   do
     switch (GslWaveTokenType (g_scanner_get_next_token (scanner)))
       {
-	uint i, token;
+	uint i;
+        int token;
         char *key;
       case '}':
 	return G_TOKEN_NONE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]