avcodec/ac3: replace #define by typedef
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 16 Nov 2015 21:54:48 +0000 (16:54 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 20 Nov 2015 13:19:55 +0000 (08:19 -0500)
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavcodec/ac3.h

index 3f67e09..ff36249 100644 (file)
@@ -73,8 +73,8 @@
 #define AC3_SPX_BLEND(x)        (x)
 #define AC3_DYNAMIC_RANGE1      0
 
-#define INTFLOAT                int
-#define SHORTFLOAT              int16_t
+typedef int                     INTFLOAT;
+typedef int16_t                 SHORTFLOAT;
 
 #else /* USE_FIXED */
 
@@ -92,8 +92,8 @@
 #define AC3_SPX_BLEND(x)        (x)* (1.0f/32)
 #define AC3_DYNAMIC_RANGE1      1.0f
 
-#define INTFLOAT                float
-#define SHORTFLOAT              float
+typedef float                   INTFLOAT;
+typedef float                   SHORTFLOAT;
 
 #endif /* USE_FIXED */