[xiph-commits] r11398 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Wed May 10 07:26:02 PDT 2006


Author: jm
Date: 2006-05-10 07:26:00 -0700 (Wed, 10 May 2006)
New Revision: 11398

Modified:
   trunk/speex/libspeex/pseudofloat.h
Log:
cleaner struct assignments (some compilers complained)


Modified: trunk/speex/libspeex/pseudofloat.h
===================================================================
--- trunk/speex/libspeex/pseudofloat.h	2006-05-10 13:51:49 UTC (rev 11397)
+++ trunk/speex/libspeex/pseudofloat.h	2006-05-10 14:26:00 UTC (rev 11398)
@@ -78,12 +78,16 @@
    }
    if (sign)
    {
-      spx_float_t r = {-x,e};
+      spx_float_t r;
+      r.m = -x;
+      r.e = e;
       return r;
    }
    else      
    {
-      spx_float_t r = {x,e};
+      spx_float_t r;
+      r.m = x;
+      r.e = e;
       return r;
    }
 }
@@ -179,7 +183,9 @@
 
 static inline spx_float_t FLOAT_MULT(spx_float_t a, spx_float_t b)
 {
-   spx_float_t r = {(spx_int16_t)((spx_int32_t)(a).m*(b).m>>15), (a).e+(b).e+15};
+   spx_float_t r;
+   r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15);
+   r.e = (a).e+(b).e+15;
    if (r.m>0)
    {
       if (r.m<16384)
@@ -201,8 +207,10 @@
 
 static inline spx_float_t FLOAT_SHL(spx_float_t a, int b)
 {
-  spx_float_t r = {a.m,a.e+b};
-  return r;
+   spx_float_t r;
+   r.m = a.m;
+   r.e = a.e+b;
+   return r;
 }
 
 static inline spx_int16_t FLOAT_EXTRACT16(spx_float_t a)



More information about the commits mailing list