Skip to content

Commit

Permalink
Fix more min/max microsoft windows C++ design flaws.
Browse files Browse the repository at this point in the history
  • Loading branch information
furby-tm committed Aug 21, 2024
1 parent f1443fa commit 263cd57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
33 changes: 0 additions & 33 deletions Package.resolved

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/Draco/include/draco/core/vector_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Scalar>::max() - next_value) {
if (result > (std::numeric_limits<Scalar>::max)() - next_value) {
// Return the max if adding would have caused an overflow.
return std::numeric_limits<Scalar>::max();
return (std::numeric_limits<Scalar>::max)();
}
result += next_value;
}
Expand Down

0 comments on commit 263cd57

Please sign in to comment.