From 890b6311b765d4e64a4ba0642ba4760bf11f7fe3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 3 Jan 2025 08:04:39 +0000 Subject: [PATCH] Adress warnings/errors with VC++ --- .../internal/frechet_light_types.h | 18 +++++++++--------- .../Frechet_distance/Frechet_distance_test.cpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light_types.h b/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light_types.h index 7db16a28122..f84b5166db6 100644 --- a/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light_types.h +++ b/Frechet_distance/include/CGAL/Frechet_distance/internal/frechet_light_types.h @@ -122,27 +122,27 @@ struct QSimpleInterval { QSimpleInterval() : valid(false) {} QSimpleInterval(CPoint const& begin, CPoint const& end) - : valid(true), free(begin, end) + : valid(true), free_interval(begin, end) { } void setFreeInterval(CPoint const& begin, CPoint const& end) { - free = {begin, end}; + free_interval = {begin, end}; // valid = true; } void setFreeInterval(PointID begin, PointID end) { - free = {begin, 0, end, 0}; + free_interval = {begin, 0, end, 0}; // valid = true; } void invalidateFreeInterval() { - free.begin = CPoint{}; - free.end = CPoint{}; + free_interval.begin = CPoint{}; + free_interval.end = CPoint{}; } - CInterval const& getFreeInterval() { return free; } + CInterval const& getFreeInterval() { return free_interval; } void setLastValidPoint(PointID const& point) { @@ -154,14 +154,14 @@ struct QSimpleInterval { void validate() { valid = true; } void invalidate() { valid = false; } - void clamp(CPoint const& min, CPoint const& max) { free.clamp(min, max); } + void clamp(CPoint const& min, CPoint const& max) { free_interval.clamp(min, max); } - bool is_empty() const { return free.is_empty(); } + bool is_empty() const { return free_interval.is_empty(); } bool is_valid() const { return valid; } private: bool valid; - CInterval free; + CInterval free_interval; PointID last_valid_point; }; diff --git a/Frechet_distance/test/Frechet_distance/Frechet_distance_test.cpp b/Frechet_distance/test/Frechet_distance/Frechet_distance_test.cpp index 623a4afa879..c88faa02acb 100644 --- a/Frechet_distance/test/Frechet_distance/Frechet_distance_test.cpp +++ b/Frechet_distance/test/Frechet_distance/Frechet_distance_test.cpp @@ -53,7 +53,7 @@ static void readCurve(std::ifstream& curve_file, TestCurve& curve) CGAL::set_ascii_mode(ss); TestPoint p; - auto ignore_count = std::numeric_limits::max(); + auto ignore_count = (std::numeric_limits::max)(); while (ss >> p) { ss.ignore(ignore_count, '\n');