diff options
author | Jim Eckerlein <UX3D-eckerlein> | 2022-06-17 19:38:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-06-17 20:40:01 +0300 |
commit | 33bad77043d3ec4b91bc302af69da8c7ba9dd204 (patch) | |
tree | 7a64d3c2e0b2ad3864f1581fe0c23e3f833c9e5d /extern/draco/patches/blender.patch | |
parent | 524a9e3db8102c89abf3b80cddaea60c314d67ae (diff) |
Draco: update to version 1.5.2
Differential Revision: https://developer.blender.org/D15233
Diffstat (limited to 'extern/draco/patches/blender.patch')
-rw-r--r-- | extern/draco/patches/blender.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/extern/draco/patches/blender.patch b/extern/draco/patches/blender.patch new file mode 100644 index 00000000000..de39260367b --- /dev/null +++ b/extern/draco/patches/blender.patch @@ -0,0 +1,30 @@ +diff --git a/draco/src/draco/attributes/geometry_attribute.h b/draco/src/draco/attributes/geometry_attribute.h +index fd478a4..c1c0148 100644 +--- a/draco/src/draco/attributes/geometry_attribute.h ++++ b/draco/src/draco/attributes/geometry_attribute.h +@@ -285,11 +285,25 @@ class GeometryAttribute { + // Make sure the in_value fits within the range of values that OutT + // is able to represent. Perform the check only for integral types. + if (std::is_integral<T>::value && std::is_integral<OutT>::value) { ++#ifdef _MSC_VER ++# pragma warning(push) ++# pragma warning(disable:4804) ++#endif ++#if defined(__GNUC__) && !defined(__clang__) ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wbool-compare" ++#endif + static constexpr OutT kOutMin = + std::is_signed<T>::value ? std::numeric_limits<OutT>::lowest() : 0; + if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) { + return false; + } ++#ifdef __GNUC__ ++# pragma GCC diagnostic pop ++#endif ++#ifdef _MSC_VER ++# pragma warning(pop) ++#endif + } + + out_value[i] = static_cast<OutT>(in_value); |