clover: Fix property_element::as for MSVC
authorJesse Natalie <jenatali@microsoft.com>
Thu, 19 Nov 2020 02:32:27 +0000 (18:32 -0800)
committerJesse Natalie <jenatali@microsoft.com>
Wed, 2 Dec 2020 18:13:33 +0000 (10:13 -0800)
commit149a036825ba74f9edd2468430f99ec0e927b845
treee08a45da4a1f5ea987c2d3207f9ae0b10ccc1f4f
parent80817b6e344258ac9b955f824ebf9019a0fc1610
clover: Fix property_element::as for MSVC

MSVC doesn't like reinterpret_cast<T>(val) where neither T nor val
are pointers. It needs to be a static cast instead.

v2: Update assert to static_assert

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
src/gallium/frontends/clover/core/property.hpp