mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
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>
This commit is contained in:
parent
33bb63cb3e
commit
ff8f8dfb79
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user