summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-03-12 18:00:15 (GMT)
committerGitHub <noreply@github.com>2021-03-12 18:00:15 (GMT)
commita09e1ea2191ad0ea2a72f7bd519b2cc95f218328 (patch)
tree7b41ca2a3fe29309e39db5ea13d1708c2c0ca69a /c++/src
parent579b266e65974fad1f7c30ac5c7c24405e2d326e (diff)
downloadhdf5-a09e1ea2191ad0ea2a72f7bd519b2cc95f218328.zip
hdf5-a09e1ea2191ad0ea2a72f7bd519b2cc95f218328.tar.gz
hdf5-a09e1ea2191ad0ea2a72f7bd519b2cc95f218328.tar.bz2
Hdf5 merge issue #458 to hdf5_1_12 (#463)
* Snapshot version 1.12 release 1-3. Update version to 1.12.1-4. * First cut of the H5 public API documentation. (#80) * First cut of the H5 public API documentation. * Added H5Z "bonus track." * Applied Quincey's patch. * Added the missing patches from Quincey's original patch. * H5PL (complete) and basic H5VL API documentation. * Added H5I API docs. * Added H5L API docs. * First installment from Elena's H5T batch. * Second installment of Elena's H5T batch. * Final installment of Elena's H5T batch. * Full set of current H5F documentation. (#105) * First cut of the H5 public API documentation. * Added H5Z "bonus track." * Applied Quincey's patch. * Added the missing patches from Quincey's original patch. * H5PL (complete) and basic H5VL API documentation. * Added H5I API docs. * Added H5L API docs. * First installment from Elena's H5T batch. * Second installment of Elena's H5T batch. * Final installment of Elena's H5T batch. * Migrated documentation for SWMR functions. * Catching up on MDC functions. * Integrated the H5F MDC function documentation. * Added MDC and parallel H5F functions. * Slightly updated main page. * Added doxygen/dox/H5AC_cache_config_t.dox to MANIFEST. * Doxygen - added (mostly) beginner functions (#112) * Doxygen - added (mostly) beginner functions * Removed duplicate H5Pset_szip function * Add src/H5module.h to MANIFEST. * close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * Avoid aligned access for references by decoding into temporary buffer and then copying the result into the actual buffer. Update test to be more thorough with using compound datatype fields everywhere. (#206) * Modify temporary rpath for testing in java example scripts. (#230) * Fix undefined left shifting of negative numbers (#338) Undefined Bahavior Sanitizer errored here about left shifting negative numbers. * Fixes various warnings noticed on Windows (#425) * Fixes various warnings noticed on Windows - Adds a prototype for our implementation of vasprintf - Return type of H5_get_utf16_str() is now non-const - Fixes possible uninitialized return type in Wremove_utf8 - Better isolation of fork() code in accum.c:test_swmr_write_big() - Better isolation of non-zlib code in dsets.c:test_filter_delete() - Removed unused variable in trefer.c:test_reference_cmpnd_obj() * Fixes clang-format issues * Applied clang-tidy readability-non-const-parameter warning fixes auto… (#429) * Automatically applied clang-tidy readability-avoid-const-params-in-decls fixes Removes useless const declarations. * Fixed most readability-non-const-parameter warnings These changes were made automatically by clang-tidy, but I manually reverted the changes related to the H5Z_func_t signature. * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Added C++11 override keyword where appropriate (#433) Added H5_OVERRIDE macro for compatibility with both C++11 and older. * Various clang tidy warning fixes (#448) * Fixed clang-tidy bugprone-reserved-identifier warnings * Fixed clang-tidy bugprone-assert-side-effect warnings * Fixed clang-tidy bugprone-copy-constructor-init warning * Fixed clang-tidy readability-redundant-preprocessor warning For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block. Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing. Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS. * Fixed clang-tidy readability-redundant-string-init warnings * Fixed some clang-tidy performance-type-promotion-in-math-fn warnings * Fixed clang-tidy performance-unnecessary-value-param warnings * Reformat source with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Removed checks/workarounds for pre-C++89 compatibility (#449) After 30+ years, just assume that the following exist: - extension-less includes - namespaces - std:: - static_cast - bool * Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451) * Fixed all clang-tidy bugprone-suspicious-string-compare warnings This change was generated entirely by clang-tidy itself. * Reformat code with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * Remove 2 functions incorrectly merged from develop in a cherry-pick merge of PR #451. Co-authored-by: Gerd Heber <gheber@hdfgroup.org> Co-authored-by: bljhdf <58825073+bljhdf@users.noreply.github.com> Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Quincey Koziol <quincey@koziol.cc> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5Attribute.cpp6
-rw-r--r--c++/src/H5DataSet.cpp4
-rw-r--r--c++/src/H5DataSpace.cpp4
-rw-r--r--c++/src/H5DataSpace.h8
-rw-r--r--c++/src/H5DataType.cpp4
-rw-r--r--c++/src/H5DcreatProp.cpp4
-rw-r--r--c++/src/H5DcreatProp.h2
-rw-r--r--c++/src/H5DxferProp.cpp2
-rw-r--r--c++/src/H5Exception.cpp2
-rw-r--r--c++/src/H5Exception.h28
-rw-r--r--c++/src/H5FaccProp.cpp4
-rw-r--r--c++/src/H5File.cpp6
-rw-r--r--c++/src/H5File.h12
-rw-r--r--c++/src/H5Group.cpp4
-rw-r--r--c++/src/H5Group.h14
-rw-r--r--c++/src/H5Include.h20
-rw-r--r--c++/src/H5Location.cpp11
-rw-r--r--c++/src/H5Object.cpp2
-rw-r--r--c++/src/H5Object.h6
-rw-r--r--c++/src/H5PropList.cpp4
20 files changed, 52 insertions, 95 deletions
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 81e656f..b74349c 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5private.h" // for HDfree
@@ -312,7 +308,7 @@ Attribute::getName(char *attr_name, size_t buf_size) const
H5std_string
Attribute::getName() const
{
- H5std_string attr_name(""); // attribute name to return
+ H5std_string attr_name; // attribute name to return
// Preliminary call to get the size of the attribute name
ssize_t name_size = H5Aget_name(id, static_cast<size_t>(0), NULL);
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 9027d79..5dc44b8 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5private.h" // for HDfree
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 9c997d1..0485530 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index f16acfc..470de74 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -43,7 +43,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
DataSpace &operator=(const DataSpace &rhs);
// Closes this dataspace.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Makes copy of an existing dataspace.
void copy(const DataSpace &like_space);
@@ -115,13 +115,13 @@ class H5_DLLCPP DataSpace : public IdComponent {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("DataSpace");
}
// Gets the dataspace id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Deletes the global constant
static void deleteConstants();
@@ -133,7 +133,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
protected:
// Sets the dataspace id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index a943a55..1689912 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index d670b74..0ffcbf7 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -769,8 +769,8 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, co
// Programmer Binh-Minh Ribler - Mar, 2017
//--------------------------------------------------------------------------
void
-DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fname,
- const H5std_string src_dsname, const DataSpace &sspace) const
+DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string &src_fname,
+ const H5std_string &src_dsname, const DataSpace &sspace) const
{
setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace);
}
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 3c032ee..820c0d1 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -123,7 +123,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
// Maps elements of a virtual dataset to elements of the source dataset.
void setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname,
const DataSpace &sspace) const;
- void setVirtual(const DataSpace &vspace, const H5std_string src_fname, const H5std_string src_dsname,
+ void setVirtual(const DataSpace &vspace, const H5std_string &src_fname, const H5std_string &src_dsname,
const DataSpace &sspace) const;
///\brief Returns this class name.
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index d9d7884..98e6214 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -306,7 +306,7 @@ DSetMemXferPropList::getDataTransform() const
{
// Initialize string to "", so that if there is no expression, the returned
// string will be empty
- H5std_string expression("");
+ H5std_string expression;
// Preliminary call to get the expression's length
ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0);
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index 1aa8ecc..8ea20ff 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -25,7 +25,7 @@ const char Exception::DEFAULT_MSG[] = "No detailed information provided";
///\brief Default constructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception() : detail_message(""), func_name("") {}
+Exception::Exception() {}
//--------------------------------------------------------------------------
// Function: Exception overloaded constructor
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 566c818..9970d22 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -18,11 +18,7 @@
#include <string>
namespace H5 {
-#ifdef H5_NO_STD
-#define H5std_string ::string
-#else
#define H5std_string std::string
-#endif
/*! \class Exception
\brief Exception provides wrappers of HDF5 error handling functions.
@@ -94,84 +90,84 @@ class H5_DLLCPP FileIException : public Exception {
public:
FileIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
FileIException();
- virtual ~FileIException() throw();
+ virtual ~FileIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP GroupIException : public Exception {
public:
GroupIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
GroupIException();
- virtual ~GroupIException() throw();
+ virtual ~GroupIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP DataSpaceIException : public Exception {
public:
DataSpaceIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataSpaceIException();
- virtual ~DataSpaceIException() throw();
+ virtual ~DataSpaceIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP DataTypeIException : public Exception {
public:
DataTypeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataTypeIException();
- virtual ~DataTypeIException() throw();
+ virtual ~DataTypeIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP ObjHeaderIException : public Exception {
public:
ObjHeaderIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
ObjHeaderIException();
- virtual ~ObjHeaderIException() throw();
+ virtual ~ObjHeaderIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP PropListIException : public Exception {
public:
PropListIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
PropListIException();
- virtual ~PropListIException() throw();
+ virtual ~PropListIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP DataSetIException : public Exception {
public:
DataSetIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataSetIException();
- virtual ~DataSetIException() throw();
+ virtual ~DataSetIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP AttributeIException : public Exception {
public:
AttributeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
AttributeIException();
- virtual ~AttributeIException() throw();
+ virtual ~AttributeIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP ReferenceException : public Exception {
public:
ReferenceException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
ReferenceException();
- virtual ~ReferenceException() throw();
+ virtual ~ReferenceException() throw() H5_OVERRIDE;
};
class H5_DLLCPP LibraryIException : public Exception {
public:
LibraryIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
LibraryIException();
- virtual ~LibraryIException() throw();
+ virtual ~LibraryIException() throw() H5_OVERRIDE;
};
class H5_DLLCPP LocationException : public Exception {
public:
LocationException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
LocationException();
- virtual ~LocationException() throw();
+ virtual ~LocationException() throw() H5_OVERRIDE;
};
class H5_DLLCPP IdComponentException : public Exception {
public:
IdComponentException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
IdComponentException();
- virtual ~IdComponentException() throw();
+ virtual ~IdComponentException() throw() H5_OVERRIDE;
}; // end of IdComponentException
} // namespace H5
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index f42b2db..af757ff 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
using std::cerr;
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index cdc9b45..e40cafe 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
@@ -182,7 +178,7 @@ H5File::H5File(hid_t existing_id) : Group()
///\param original - IN: H5File instance to copy
// December 2000
//--------------------------------------------------------------------------
-H5File::H5File(const H5File &original) : Group()
+H5File::H5File(const H5File &original) : Group(original)
{
id = original.getId();
incRefCount(); // increment number of references to this id
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index d287031..6126eec 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -39,7 +39,7 @@ class H5_DLLCPP H5File : public Group {
const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
// Close this file.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
// Gets a copy of the access property list of this file.
FileAccPropList getAccessPlist() const;
@@ -96,16 +96,16 @@ class H5_DLLCPP H5File : public Group {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("H5File");
}
// Throw file exception.
- virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE;
// For CommonFG to get the file id.
- virtual hid_t getLocId() const;
+ virtual hid_t getLocId() const H5_OVERRIDE;
// Default constructor
H5File();
@@ -114,7 +114,7 @@ class H5_DLLCPP H5File : public Group {
H5File(const H5File &original);
// Gets the HDF5 file id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// H5File destructor.
virtual ~H5File();
@@ -122,7 +122,7 @@ class H5_DLLCPP H5File : public Group {
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the HDF5 file id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 392f31a..2fc6899 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index 2a0f18e..fb9fbe7 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -24,20 +24,20 @@ namespace H5 {
class H5_DLLCPP Group : public H5Object, public CommonFG {
public:
// Close this group.
- virtual void close();
+ virtual void close() H5_OVERRIDE;
///\brief Returns this class name.
virtual H5std_string
- fromClass() const
+ fromClass() const H5_OVERRIDE
{
return ("Group");
}
// Throw group exception.
- virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const;
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE;
// for CommonFG to get the file id.
- virtual hid_t getLocId() const;
+ virtual hid_t getLocId() const H5_OVERRIDE;
// Creates a group by way of dereference.
Group(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT,
@@ -63,10 +63,10 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
Group(const Group &original);
// Gets the group id.
- virtual hid_t getId() const;
+ virtual hid_t getId() const H5_OVERRIDE;
// Destructor
- virtual ~Group();
+ virtual ~Group() H5_OVERRIDE;
// Creates a copy of an existing group using its id.
Group(const hid_t group_id);
@@ -74,7 +74,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the group id.
- virtual void p_setId(const hid_t new_id);
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
diff --git a/c++/src/H5Include.h b/c++/src/H5Include.h
index 1f03150..0dc930d 100644
--- a/c++/src/H5Include.h
+++ b/c++/src/H5Include.h
@@ -14,19 +14,6 @@
#include <hdf5.h>
-// Define bool type for platforms that don't support bool yet
-#ifdef BOOL_NOTDEFINED
-#ifdef false
-#undef false
-#endif
-#ifdef true
-#undef true
-#endif
-typedef int bool;
-const bool false = 0;
-const bool true = 1;
-#endif
-
// These are defined in H5Opkg.h, which should not be included in the C++ API,
// so re-define them here for now.
@@ -37,3 +24,10 @@ const bool true = 1;
* magic number as prefix and checksum as suffix for all chunks.
*/
#define H5O_VERSION_2 2
+
+// Define H5_OVERRIDE to override for C++11.
+#if defined(__cplusplus) && (201103L <= __cplusplus)
+#define H5_OVERRIDE override
+#else
+#define H5_OVERRIDE
+#endif
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 2d14bfc..b136faa 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -346,7 +346,7 @@ H5Location::getComment(const char *name, size_t buf_size) const
{
// Initialize string to "", so that if there is no comment, the returned
// string will be empty
- H5std_string comment("");
+ H5std_string comment;
// Preliminary call to get the comment's length
ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT);
@@ -398,6 +398,7 @@ H5Location::getComment(const H5std_string &name, size_t buf_size) const
{
return (getComment(name.c_str(), buf_size));
}
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
@@ -646,6 +647,7 @@ H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
return (obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
+
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
@@ -704,6 +706,7 @@ H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
}
return (obj_type);
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::getRegion
@@ -1816,7 +1819,7 @@ H5Location::getLinkval(const char *name, size_t size) const
H5L_info2_t linkinfo;
char * value_C; // value in C string
size_t val_size = size;
- H5std_string value = "";
+ H5std_string value;
herr_t ret_value;
// if user doesn't provide buffer size, determine it
@@ -2294,7 +2297,6 @@ H5Location::childObjVersion(const H5std_string &objname) const
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location::getObjTypeByIdx
///\brief Returns the type of an object in this group, given the
@@ -2372,7 +2374,6 @@ H5Location::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const
return (obj_type);
}
-#endif // DOXYGEN_SHOULD_SKIP_THIS
#endif /* H5_NO_DEPRECATED_SYMBOLS */
//--------------------------------------------------------------------------
@@ -2433,6 +2434,4 @@ f_DataSpace_setId(DataSpace *dspace, hid_t new_id)
//--------------------------------------------------------------------------
H5Location::~H5Location() {}
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
} // namespace H5
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 725d1da..c2eba8d 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -477,7 +477,7 @@ H5Object::getObjName(char *obj_name, size_t buf_size) const
H5std_string
H5Object::getObjName() const
{
- H5std_string obj_name(""); // object name to return
+ H5std_string obj_name; // object name to return
// Preliminary call to get the size of the object name
ssize_t name_size = H5Iget_name(getId(), NULL, static_cast<size_t>(0));
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 868f63f..bc2f14a 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -106,7 +106,7 @@ class H5_DLLCPP H5Object : public H5Location {
void removeAttr(const H5std_string &name) const;
// Returns an identifier.
- virtual hid_t getId() const = 0;
+ virtual hid_t getId() const H5_OVERRIDE = 0;
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
// DataType.
@@ -122,10 +122,10 @@ class H5_DLLCPP H5Object : public H5Location {
// Sets the identifier of this object to a new value. - this one
// doesn't increment reference count
- virtual void p_setId(const hid_t new_id) = 0;
+ virtual void p_setId(const hid_t new_id) H5_OVERRIDE = 0;
// Noop destructor.
- virtual ~H5Object();
+ virtual ~H5Object() H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index c5d3bea..fe4b6f4 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>