Skip to content

Commit

Permalink
Backport c++ fix (#232)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Oct 4, 2024
2 parents e9749ac + fafa05a commit fe32474
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set version = "1.14.4" %}
{% set maj_min_ver = ".".join(version.split(".")[:2]) %}
{% set build = 0 %}
{% set build = 1 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
Expand Down Expand Up @@ -51,6 +51,8 @@ source:
# Enable cross-compiling on osx
- patches/0001-avoid-test-execution-when-cross-compiling.patch # [osx and build_platform != target_platform]
- patches/0002-run-host-H5detect-when-cross-compiling.patch # [osx and build_platform != target_platform]
# Fix operator= (https://github.com/HDFGroup/hdf5/pull/4473)
- patches/ea760136.patch

build:
number: {{ build }}
Expand Down
41 changes: 41 additions & 0 deletions recipe/patches/ea760136.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From ea76013648aac81cee941a7b7a86f21201d1debf Mon Sep 17 00:00:00 2001
From: Julien Schueller <[email protected]>
Date: Fri, 10 May 2024 23:30:19 +0200
Subject: [PATCH] H5Group: Fix operator= (#4473)

Closes #4472
---
c++/src/H5Attribute.cpp | 4 +---
c++/src/H5Group.cpp | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index e629a800c76..a79d7c3a024 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -610,9 +610,7 @@ Attribute::~Attribute()
Attribute &
Attribute::operator=(const Attribute &original)
{
- if (&original != this) {
- setId(original.id);
- }
+ IdComponent::operator=(original);

return *this;
}
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 248e71f9571..48358b3a5cb 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -279,9 +279,7 @@ Group::~Group()
Group &
Group::operator=(const Group &original)
{
- if (&original != this) {
- setId(original.id);
- }
+ IdComponent::operator=(original);

return *this;
}

0 comments on commit fe32474

Please sign in to comment.