From 52833887215603e06c37606fd4e56e4c60c745e8 Mon Sep 17 00:00:00 2001 From: Sylvie Lamy-Thepaut Date: Thu, 20 Apr 2023 13:35:11 +0100 Subject: [PATCH 1/7] CMakeLists.txt : next version4.15.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d77c2ec8..395d9591 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") find_package( ecbuild 3.4 REQUIRED ) -project( magics VERSION 4.14.0 LANGUAGES CXX ) +project( magics VERSION 4.15.0 LANGUAGES CXX ) # make sure that the header files are installed into include/magics # note that this needs to be done before ecbuild_declare_project() From 93446e3380d0b832d4975caae5a90f8fed530a89 Mon Sep 17 00:00:00 2001 From: Sylvie Lamy-Thepaut Date: Thu, 20 Apr 2023 13:36:12 +0100 Subject: [PATCH 2/7] CMakeLists.txt : version 4.14.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 395d9591..d77c2ec8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") find_package( ecbuild 3.4 REQUIRED ) -project( magics VERSION 4.15.0 LANGUAGES CXX ) +project( magics VERSION 4.14.0 LANGUAGES CXX ) # make sure that the header files are installed into include/magics # note that this needs to be done before ecbuild_declare_project() From 723d87f07e07aba70c087e68ee65d1ba1bef79b3 Mon Sep 17 00:00:00 2001 From: Sylvie Lamy-Thepaut Date: Thu, 14 Dec 2023 13:34:32 +0100 Subject: [PATCH 3/7] Fixing percentiles --- src/visualisers/EpsGraph.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/visualisers/EpsGraph.cc b/src/visualisers/EpsGraph.cc index 1998281f..5569c45c 100644 --- a/src/visualisers/EpsGraph.cc +++ b/src/visualisers/EpsGraph.cc @@ -2589,15 +2589,18 @@ void EpsPlume::timeserie(Data& data, BasicGraphicsObjectContainer& visitor) { } if (shading_) { for (vector::iterator level = shading_levels_.begin(); level != shading_levels_.end(); ++level) { - int i = *level * (members.size()/100.); + int i = (*level/100) * members.size(); + if (i >= members.size()) i = members.size() - 1; + + shading[*level].push_back(PaperPoint(x, members[i])); } } if (percentiles_) { for (vector::iterator level = percentiles_list_.begin(); level != percentiles_list_.end(); ++level) { - int i = *level * (members.size()/100.); + int i = (*level/100) * members.size(); if (i >= members.size()) i = members.size() - 1; percentiles[*level].push_back(PaperPoint(x, members[i])); From 3631c96d46385b391323666ec8ec2261a1809646 Mon Sep 17 00:00:00 2001 From: Iain Russell Date: Mon, 3 Apr 2023 13:37:48 +0100 Subject: [PATCH 4/7] Enforce C++17 standard [MAGP-1356] --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 395d9591..43506ffe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(INSTALL_INCLUDE_DIR include/magics CACHE PATH "Magics installation directory include(ecbuild_system NO_POLICY_SCOPE) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD 99) From 56d635cc152643fc0c68e1a5c00ac673ddd142e6 Mon Sep 17 00:00:00 2001 From: Iain Russell Date: Mon, 3 Apr 2023 13:38:23 +0100 Subject: [PATCH 5/7] Remove use of deprecated unary_function [MAGP-1356] --- src/common/Polyline.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Polyline.cc b/src/common/Polyline.cc index 76a117cf..836697da 100644 --- a/src/common/Polyline.cc +++ b/src/common/Polyline.cc @@ -107,7 +107,7 @@ struct SouthCleaner { bool operator()(PaperPoint& point) { return point.y_ < -89; } }; -struct LonFinder : std::unary_function { +struct LonFinder { LonFinder() {} bool operator()(PaperPoint& point) const { return (same(point.x_, -180.)); } From b39835a48cbc514024c23ab29a545f03f63a18c5 Mon Sep 17 00:00:00 2001 From: Iain Russell Date: Tue, 19 Dec 2023 15:56:12 +0000 Subject: [PATCH 6/7] Tighten up test for std::filesystem with gcc 7.5 [MAGP-1356] --- src/web/MagConfig.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/web/MagConfig.cc b/src/web/MagConfig.cc index 8691cde0..d07cf41b 100644 --- a/src/web/MagConfig.cc +++ b/src/web/MagConfig.cc @@ -18,7 +18,15 @@ #include "Value.h" -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) +#define STD_FILESYSTEM_INCLUDE_MISSING 0 +#ifdef __has_include + #if !__has_include() + #define STD_FILESYSTEM_INCLUDE_MISSING 1 + #endif +#endif + + +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (__cplusplus >= 201703L) && !STD_FILESYSTEM_INCLUDE_MISSING) #include namespace fs = std::filesystem; #else @@ -579,4 +587,4 @@ bool PaletteLibrary::find(string& name, Palette& out) { } return false; -} \ No newline at end of file +} From 08910143b36256d1a7e18e717a7c26f4bcca28a7 Mon Sep 17 00:00:00 2001 From: Iain Russell Date: Mon, 5 Feb 2024 11:01:32 +0000 Subject: [PATCH 7/7] Version 4.15.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43506ffe..d920ca02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild/cmake") find_package( ecbuild 3.4 REQUIRED ) -project( magics VERSION 4.15.0 LANGUAGES CXX ) +project( magics VERSION 4.15.2 LANGUAGES CXX ) # make sure that the header files are installed into include/magics # note that this needs to be done before ecbuild_declare_project()