compiler issues, warnings, makefile spiffs
[goodguy/history.git] / cinelerra-5.1 / plugins / freeverb / Components / denormals.h
index bb100d31c6a9fc6720c94b3029c9b304006cde54..a6d599a665c0e3bc8dd665322144e389dd2f9973 100644 (file)
@@ -1,19 +1,27 @@
-// Macro for killing denormalled numbers\r
-//\r
-// Written by Jezar at Dreampoint, June 2000\r
-// http://www.dreampoint.co.uk\r
-// Based on IS_DENORMAL macro by Jon Watte\r
-// This code is public domain\r
-\r
-#ifndef _denormals_\r
-#define _denormals_\r
-\r
-#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f\r
-\r
-#endif//_denormals_\r
-\r
-//ends\r
-\r
-\r
-\r
-\r
+// Macro for killing denormalled numbers
+//
+// Written by Jezar at Dreampoint, June 2000
+// http://www.dreampoint.co.uk
+// Based on IS_DENORMAL macro by Jon Watte
+// This code is public domain
+
+#ifndef _denormals_
+#define _denormals_
+
+/*
+#define undenormalise(sample) \
+ if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
+*/
+
+static inline void undenormalise(float &sample) {
+  union { float f; unsigned int u; } v;  v.f = sample;
+  if( !(v.u & 0x7f800000) ) sample=0.f;
+}
+#endif//_denormals_
+
+//ends
+
+
+
+