Revision: 37222
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37222
Author:   jwilkins
Date:     2011-06-05 20:34:13 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Fixed "constant truncated" warning in AUD_ConverterFunctions.cpp

Integer constants are sizeof(int) or greater depending on their values.  MSVC 
apparently is not clever enough to check if the value inside an int is actually 
truncated even though that could be used to prevent false alarms.  To silence 
the warning I just cast the constant to an int16_t.

Modified Paths:
--------------
    branches/soc-2011-onion/intern/audaspace/intern/AUD_ConverterFunctions.cpp

Modified: 
branches/soc-2011-onion/intern/audaspace/intern/AUD_ConverterFunctions.cpp
===================================================================
--- branches/soc-2011-onion/intern/audaspace/intern/AUD_ConverterFunctions.cpp  
2011-06-05 20:22:24 UTC (rev 37221)
+++ branches/soc-2011-onion/intern/audaspace/intern/AUD_ConverterFunctions.cpp  
2011-06-05 20:34:13 UTC (rev 37222)
@@ -33,8 +33,8 @@
 #include "AUD_Buffer.h"
 
 #define AUD_U8_0               0x80
-#define AUD_S16_MAX            0x7FFF
-#define AUD_S16_MIN            0x8000
+#define AUD_S16_MAX            ((int16_t)0x7FFF)
+#define AUD_S16_MIN            ((int16_t)0x8000)
 #define AUD_S16_FLT            32768.0f
 #define AUD_S32_MAX            0x7FFFFFFF
 #define AUD_S32_MIN            0x80000000

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to