From 09283ffbcb921efa89a7a1ca728f1d4b7064df8e Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Fri, 20 Aug 2021 16:32:15 -0400 Subject: 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' * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- c++/src/H5PropList.cpp | 5 +++-- 1 file 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. -- cgit v0.12