• Jason Ekstrand's avatar
    nir: Make the type casting operations static inline functions · 8edcd1de
    Jason Ekstrand authored
    Previously, the casting operations were macros.  While this is usually
    fine, the casting macro used the input parameter twice leading to strange
    behavior when you passed the result of another function into it.  Since we
    know the source and destination types explicitly, we don't loose anything
    by making it a function.
    Also, this gives us a nice little macro for creating cast function that
    will hopefully prevent mistyping.
    Reviewed-by: default avatarConnor Abbott <cwabbott0@gmail.com>