From 94b6b5d2da23fead5c763c51b674e064135506d7 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Mon, 13 Nov 2023 12:27:33 +0000 Subject: [PATCH 1/3] Fix interpolation warnings --- src/atlas/interpolation/Cache.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/atlas/interpolation/Cache.h b/src/atlas/interpolation/Cache.h index 412957eb3..2e70f827c 100644 --- a/src/atlas/interpolation/Cache.h +++ b/src/atlas/interpolation/Cache.h @@ -108,7 +108,6 @@ class MatrixCache final : public Cache { public: MatrixCache() = default; MatrixCache(const Cache& c); - MatrixCache(const MatrixCache& c) : MatrixCache(Cache(c)) {} MatrixCache(Matrix&& m); MatrixCache(std::shared_ptr m, const std::string& uid = ""); MatrixCache(const Matrix* m); From 99d7ca01779649635d4abb820e3ceac76807f888 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Mon, 13 Nov 2023 12:27:44 +0000 Subject: [PATCH 2/3] Fix logic --- src/atlas/redistribution/detail/RedistributeGeneric.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/atlas/redistribution/detail/RedistributeGeneric.cc b/src/atlas/redistribution/detail/RedistributeGeneric.cc index 9e86fff15..d1aa54888 100644 --- a/src/atlas/redistribution/detail/RedistributeGeneric.cc +++ b/src/atlas/redistribution/detail/RedistributeGeneric.cc @@ -121,9 +121,9 @@ std::vector getUidVec(const FunctionSpace& functionspace) { // Check UIDs are unique. if (ATLAS_BUILD_TYPE_DEBUG) { const size_t vecSize = uidVec.size(); - std::unique(uidVec.begin(), uidVec.end(), - [](const IdxUid& a, const IdxUid& b) { return a.second == b.second; }); - ATLAS_ASSERT(uidVec.size() == vecSize, "Unique ID set has duplicate members"); + auto first_duplicate = std::adjacent_find( + uidVec.begin(), uidVec.end(), [](const IdxUid& a, const IdxUid& b) { return a.second == b.second; }); + ATLAS_ASSERT(uidVec.end() == first_duplicate, "Unique ID set has duplicate members"); } return uidVec; From 4f72ed5ec30efd6fd2b27a5d690de51ccbeb7c75 Mon Sep 17 00:00:00 2001 From: Pedro Maciel Date: Mon, 13 Nov 2023 15:18:41 +0000 Subject: [PATCH 3/3] Cleanup --- src/atlas/redistribution/detail/RedistributeGeneric.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/atlas/redistribution/detail/RedistributeGeneric.cc b/src/atlas/redistribution/detail/RedistributeGeneric.cc index d1aa54888..b9b3a3979 100644 --- a/src/atlas/redistribution/detail/RedistributeGeneric.cc +++ b/src/atlas/redistribution/detail/RedistributeGeneric.cc @@ -120,7 +120,6 @@ std::vector getUidVec(const FunctionSpace& functionspace) { // Check UIDs are unique. if (ATLAS_BUILD_TYPE_DEBUG) { - const size_t vecSize = uidVec.size(); auto first_duplicate = std::adjacent_find( uidVec.begin(), uidVec.end(), [](const IdxUid& a, const IdxUid& b) { return a.second == b.second; }); ATLAS_ASSERT(uidVec.end() == first_duplicate, "Unique ID set has duplicate members");