aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-07-02 10:22:30 +0300
committerMartin Storsjö <martin@martin.st>2012-07-02 14:05:40 +0300
commitff8f8dfb799e73987c46da7b33259b9df9b6823e (patch)
tree65b16421db91cbbaa07ddda0d6f2f2c47be620b0
parent33bb63cb3e1de6d78c475cf14384089ef3f1867d (diff)
downloadffmpeg-ff8f8dfb799e73987c46da7b33259b9df9b6823e.tar.gz
intfloat: Don't use designated initializers in the public headers
intfloat.h is a public header, and is now (since a1245d5ca) included by mathematics.h, which many external callers include. This fixes building third party applications that include mathematics.h in a language that doesn't support designated initalizers. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavutil/intfloat.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavutil/intfloat.h b/libavutil/intfloat.h
index 9db624a6ce..38d26ad87e 100644
--- a/libavutil/intfloat.h
+++ b/libavutil/intfloat.h
@@ -39,7 +39,8 @@ union av_intfloat64 {
*/
static av_always_inline float av_int2float(uint32_t i)
{
- union av_intfloat32 v = { .i = i };
+ union av_intfloat32 v;
+ v.i = i;
return v.f;
}
@@ -48,7 +49,8 @@ static av_always_inline float av_int2float(uint32_t i)
*/
static av_always_inline uint32_t av_float2int(float f)
{
- union av_intfloat32 v = { .f = f };
+ union av_intfloat32 v;
+ v.f = f;
return v.i;
}
@@ -57,7 +59,8 @@ static av_always_inline uint32_t av_float2int(float f)
*/
static av_always_inline double av_int2double(uint64_t i)
{
- union av_intfloat64 v = { .i = i };
+ union av_intfloat64 v;
+ v.i = i;
return v.f;
}
@@ -66,7 +69,8 @@ static av_always_inline double av_int2double(uint64_t i)
*/
static av_always_inline uint64_t av_double2int(double f)
{
- union av_intfloat64 v = { .f = f };
+ union av_intfloat64 v;
+ v.f = f;
return v.i;
}