summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IdComponent.cpp
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-23 03:42:02 (GMT)
committerGitHub <noreply@github.com>2021-06-23 03:42:02 (GMT)
commitcc88fe8fafa0a522ba583bf75b2fe9a15688db9c (patch)
tree322f12e7ebe3cd900ec65486466991ebdf48ea94 /c++/src/H5IdComponent.cpp
parent3d4481c2920b7b983a8d791a266cd2bc9c96e846 (diff)
downloadhdf5-cc88fe8fafa0a522ba583bf75b2fe9a15688db9c.zip
hdf5-cc88fe8fafa0a522ba583bf75b2fe9a15688db9c.tar.gz
hdf5-cc88fe8fafa0a522ba583bf75b2fe9a15688db9c.tar.bz2
Removes C++ dependency on H5private.h (#774)
* Removes C++ dependency on H5private.h Most C API calls have been removed, aside from a few uses of free, where we just dropped the 'HD'. A couple of H5_ATTR_UNUSED macros were also replaced with (void) statements. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++/src/H5IdComponent.cpp')
-rw-r--r--c++/src/H5IdComponent.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 18bcbd3..d546d32 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -13,7 +13,6 @@
#include <string>
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5Library.h"
@@ -399,8 +398,7 @@ IdComponent::p_get_file_name() const
}
// Call H5Fget_name again to get the actual file name
- char *name_C = new char[name_size + 1]; // temporary C-string for C API
- HDmemset(name_C, 0, name_size + 1); // clear buffer
+ char *name_C = new char[name_size + 1]();
name_size = H5Fget_name(temp_id, name_C, name_size + 1);