From ed5021af5cf71d488b2b3c8d167e91fc3e5cb73f Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Wed, 12 Jul 2023 20:53:18 +0200 Subject: [PATCH 1/3] Fix deprecated Triangle_coordinates in debug mode --- src/PolyFeature.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/PolyFeature.cpp b/src/PolyFeature.cpp index ae649dc..ba3c09f 100644 --- a/src/PolyFeature.cpp +++ b/src/PolyFeature.cpp @@ -33,7 +33,7 @@ #include #include #ifndef NDEBUG -#include +#include #endif PolyFeature::PolyFeature() @@ -165,7 +165,6 @@ void PolyFeature::calc_footprint_elevation_nni(const DT& dt) { #ifndef NDEBUG void PolyFeature::calc_footprint_elevation_linear(const DT& dt) { - typedef CGAL::Barycentric_coordinates::Triangle_coordinates_2 Triangle_coordinates; DT::Face_handle fh = nullptr; for (auto& ring : _poly.rings()) { std::vector ringHeights; @@ -180,11 +179,14 @@ void PolyFeature::calc_footprint_elevation_linear(const DT& dt) { return; } - Triangle_coordinates triangle_coordinates(fh->vertex(0)->point(), - fh->vertex(1)->point(), - fh->vertex(2)->point()); std::vector coords; - triangle_coordinates(pt, std::back_inserter(coords)); + CGAL::Barycentric_coordinates::triangle_coordinates_2( + Point_2(fh->vertex(0)->point().x(), fh->vertex(0)->point().y()), + Point_2(fh->vertex(1)->point().x(), fh->vertex(1)->point().y()), + Point_2(fh->vertex(2)->point().x(), fh->vertex(2)->point().y()), + Point_2(pt.x(), pt.y()), + std::back_inserter(coords) + ); double h = 0; for (int i = 0; i < 3; ++i) { From b755a9add1c3990c185065febf56c14581a8a2da Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Wed, 12 Jul 2023 21:05:19 +0200 Subject: [PATCH 2/3] Bump version --- CHANGELOG.md | 4 ++++ src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ff539e..643fada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.4.2] - 2023-07-12 +### Fixed +- Problematic compilation in debug mode + ## [0.4.1] - 2023-06-05 ### Fixed - STL export bugfix diff --git a/src/main.cpp b/src/main.cpp index a9c8d40..826e12a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -31,7 +31,7 @@ #include -std::string CITY4CFD_VERSION = "0.4.1"; +std::string CITY4CFD_VERSION = "0.4.2"; void printWelcome() { auto logo{ From 67684bbb6905769666875ab718b90854668686b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Pa=C4=91en?= <49401914+ipadjen@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:35:57 +0200 Subject: [PATCH 3/3] Fix macos build action --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c771b82..4cf820a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: - name: Install dependencies run: | brew update + brew upgrade || true brew install cmake boost cgal eigen libomp gdal - name: Build run: |