From 263cd579af27f029946fc2a67f49debe70b4c79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?furby=E2=84=A2?= Date: Wed, 21 Aug 2024 17:35:49 -0600 Subject: [PATCH] Fix more min/max microsoft windows C++ design flaws. --- Package.resolved | 33 --------------------- Sources/Draco/include/draco/core/vector_d.h | 4 +-- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 7c685f95..00000000 --- a/Package.resolved +++ /dev/null @@ -1,33 +0,0 @@ -{ - "originHash" : "912604f76e421a385106670da68e757144a557379bcf9e006b45eb9bfe533a92", - "pins" : [ - { - "identity" : "metaversepythonframework", - "kind" : "remoteSourceControl", - "location" : "https://github.com/wabiverse/MetaversePythonFramework", - "state" : { - "revision" : "e2f4ba867b7e287a283a27a0005ab64deef14279", - "version" : "3.11.7" - } - }, - { - "identity" : "metaversevulkanframework", - "kind" : "remoteSourceControl", - "location" : "https://github.com/wabiverse/MetaverseVulkanFramework", - "state" : { - "revision" : "13c7061599c61a4959c558d8ec1836e5b32b640b", - "version" : "1.26.2" - } - }, - { - "identity" : "pythonkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pvieito/PythonKit.git", - "state" : { - "revision" : "43647b36cacb99558e57ef98e97ef598f91d1164", - "version" : "0.5.0" - } - } - ], - "version" : 3 -} diff --git a/Sources/Draco/include/draco/core/vector_d.h b/Sources/Draco/include/draco/core/vector_d.h index a0ec2ded..e731da57 100644 --- a/Sources/Draco/include/draco/core/vector_d.h +++ b/Sources/Draco/include/draco/core/vector_d.h @@ -238,9 +238,9 @@ class VectorD { Scalar result(0); for (int i = 0; i < dimension; ++i) { Scalar next_value = std::abs(v_[i]); - if (result > std::numeric_limits::max() - next_value) { + if (result > (std::numeric_limits::max)() - next_value) { // Return the max if adding would have caused an overflow. - return std::numeric_limits::max(); + return (std::numeric_limits::max)(); } result += next_value; }