avcodec/resample2: replace #define by typedef
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 16 Nov 2015 22:14:22 +0000 (17:14 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 20 Nov 2015 13:20:30 +0000 (08:20 -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/resample2.c

index cd9fe1c..56ae9f7 100644 (file)
@@ -34,9 +34,9 @@
 #ifndef CONFIG_RESAMPLE_HP
 #define FILTER_SHIFT 15
 
-#define FELEM int16_t
-#define FELEM2 int32_t
-#define FELEML int64_t
+typedef int16_t FELEM;
+typedef int32_t FELEM2;
+typedef int64_t FELEML;
 #define FELEM_MAX INT16_MAX
 #define FELEM_MIN INT16_MIN
 #define WINDOW_TYPE 9
@@ -52,9 +52,9 @@
 #else
 #define FILTER_SHIFT 0
 
-#define FELEM double
-#define FELEM2 double
-#define FELEML double
+typedef double FELEM;
+typedef double FELEM2;
+typedef double FELEML;
 #define WINDOW_TYPE 24
 #endif