Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport c++ fix #232

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}