From b590611a71bd4be2fd7a92bc65666e9ba6355a2a Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 8 Jan 2018 15:38:46 +0000 Subject: Fix std::max Windows issue git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@3120 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9aad5e17fb5b93b9b9054ce093dd54a56ca4b08a --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 527267a5..580f85ed 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -692,7 +692,7 @@ class Simplex_tree { return { null_simplex(), true }; // FIXME: false would make more sense to me. GUDHI_CHECK(std::is_sorted(first, last), "simplex vertices listed in unsorted order"); // Update dimension if needed. We could wait to see if the insertion succeeds, but I doubt there is much to gain. - dimension_ = std::max(dimension_, static_cast(std::distance(first, last)) - 1); + dimension_ = (std::max)(dimension_, static_cast(std::distance(first, last)) - 1); return rec_insert_simplex_and_subfaces_sorted(root(), first, last, filt); } // To insert {1,2,3,4}, we insert {2,3,4} twice, once at the root, and once below 1. @@ -1132,7 +1132,7 @@ class Simplex_tree { to_be_inserted=false; break; } - filt = std::max(filt, filtration(border_child)); + filt = (std::max)(filt, filtration(border_child)); } if (to_be_inserted) { intersection.emplace_back(next->first, Node(nullptr, filt)); @@ -1328,7 +1328,7 @@ class Simplex_tree { if (sh_dimension >= dimension_) // Stop browsing as soon as the dimension is reached, no need to go furter return false; - new_dimension = std::max(new_dimension, sh_dimension); + new_dimension = (std::max)(new_dimension, sh_dimension); } dimension_ = new_dimension; return true; -- cgit v1.2.3