Commit bcc1edc0 authored by Fabian Müller's avatar Fabian Müller
Browse files

Improve readability of is_numeric_float

Also fixes an implicit narrowing.
parent 5bc8fff6
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -1742,19 +1742,9 @@ double anint(
int16_t is_numeric_float(
    float x )
{
#ifndef BASOP_NOGLOB
    union float_int
#else  /* BASOP_NOGLOB */
    union float_int
#endif /* BASOP_NOGLOB */
    {
        float float_val;
        int32_t int_val;
    } float_int;

    float_int.float_val = x;

    return ( ( float_int.int_val & 0x7f800000 ) != 0x7f800000 );
#define WMC_TOOL_SKIP
    return (int16_t) ( !isnan( x ) && !isinf( x ) );
#undef WMC_TOOL_SKIP
}

/*-------------------------------------------------------------------*