From 0a9099807a127a74b35ecf2c4ad98d6571f2e753 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Sat, 21 Aug 2021 09:30:18 -0500 Subject: Fixed MSVC compile error in C++23 mode (#945) Error message from MSVC with C++23 enabled: error C2440: 'return': cannot convert from 'int' to 'std::basic_string' Co-authored-by: Sean McBride --- 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 fda4114..1300641 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -548,7 +548,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 @@ -562,8 +562,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