Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blender.patch « patches « draco « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: de39260367be946060fed2828641e9a79a4f7c40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);