summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-08-20 20:32:15 (GMT)
committerGitHub <noreply@github.com>2021-08-20 20:32:15 (GMT)
commit09283ffbcb921efa89a7a1ca728f1d4b7064df8e (patch)
tree2440fa025979ebc7d5495bacdc402deff32f8c44 /c++
parentde60f08b0df0abdcac1c6959b393a6862dadd4ce (diff)
downloadhdf5-09283ffbcb921efa89a7a1ca728f1d4b7064df8e.zip
hdf5-09283ffbcb921efa89a7a1ca728f1d4b7064df8e.tar.gz
hdf5-09283ffbcb921efa89a7a1ca728f1d4b7064df8e.tar.bz2
Get class name null str (#899)
* Fixed MSVC compile error in C++23 mode Error message from MSVC with C++23 enabled: error C2440: 'return': cannot convert from 'int' to 'std::basic_string<char,std::char_traits,std::allocator>' * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5PropList.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 7dca716..7ee8395 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -543,7 +543,7 @@ PropList::getPropSize(const H5std_string &name) const
// Function: PropList::getClassName
///\brief Return the name of a generic property list class.
///\return A string containing the class name, if success, otherwise,
-/// a NULL string.
+/// an empty string.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5std_string
@@ -557,8 +557,9 @@ PropList::getClassName() const
return (class_name);
}
else
- return 0;
+ return "";
}
+
//--------------------------------------------------------------------------
// Function: PropList::getNumProps
///\brief Returns the number of properties in this property list or class.