Skip to content

Commit

Permalink
Hdf5 merge issue #458 to hdf5_1_12 (#463)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Remove 2 functions incorrectly merged from develop in a cherry-pick merge of PR #451.

Co-authored-by: Gerd Heber <[email protected]>
Co-authored-by: bljhdf <[email protected]>
Co-authored-by: H. Joe Lee <[email protected]>
Co-authored-by: Quincey Koziol <[email protected]>
Co-authored-by: Sean McBride <[email protected]>
Co-authored-by: Dana Robinson <[email protected]>
  • Loading branch information
7 people authored Mar 12, 2021
1 parent 579b266 commit a09e1ea
Show file tree
Hide file tree
Showing 148 changed files with 787 additions and 997 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,6 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake)
include (${HDF_RESOURCES_DIR}/HDFCXXCompilerFlags.cmake)

if (CMAKE_NO_STD_NAMESPACE)
set (H5_NO_STD 1)
endif ()
add_subdirectory (c++)
if (HDF5_BUILD_HL_LIB)
if (EXISTS "${HDF5_SOURCE_DIR}/hl/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/c++")
Expand Down
4 changes: 0 additions & 4 deletions c++/examples/chunks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
* We will read from the file created by extend.cpp
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;

Expand Down
4 changes: 0 additions & 4 deletions c++/examples/compound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
* and read back fields' subsets.
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;

Expand Down
4 changes: 0 additions & 4 deletions c++/examples/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
* This example writes a dataset to a new HDF5 file.
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif

#include <string>
#include "H5Cpp.h"
Expand Down
4 changes: 0 additions & 4 deletions c++/examples/extend_ds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
*
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

using std::cout;
Expand Down
4 changes: 0 additions & 4 deletions c++/examples/h5group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
* the C version is used in this example.
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;

Expand Down
4 changes: 0 additions & 4 deletions c++/examples/readdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
// information about the dataset in the SDS.h5 file is obtained.
//

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;

Expand Down
36 changes: 6 additions & 30 deletions c++/examples/testh5c++.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ temp_FILES="a.out $applib"
cat > $appmain <<EOF
#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include "H5Cpp.h"
Expand All @@ -95,19 +91,11 @@ EOF

# generate prog1
cat > $prog1 <<EOF
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <iostream>
#include <string>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
using std::cout;
using std::endl;
int sub1(void)
{
cout << "in sub1" << endl;
Expand All @@ -117,19 +105,11 @@ EOF

# generate prog2
cat > $prog2 <<EOF
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <iostream>
#include <string>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
using std::cout;
using std::endl;
int sub2(void)
{
cout << "in sub2" << endl;
Expand All @@ -142,11 +122,7 @@ EOF
cat > $hdf5main <<EOF
#include <string>
#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include "H5Cpp.h"
Expand Down
4 changes: 0 additions & 4 deletions c++/examples/writedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
* file is closed. Program reopens the file and reads and displays the result.
*/

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
using std::cout;
using std::endl;

Expand Down
6 changes: 1 addition & 5 deletions c++/src/H5Attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

#include "H5private.h" // for HDfree
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions c++/src/H5DataSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

#include "H5private.h" // for HDfree
Expand Down
4 changes: 0 additions & 4 deletions c++/src/H5DataSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

#include "H5Include.h"
Expand Down
8 changes: 4 additions & 4 deletions c++/src/H5DataSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -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

Expand Down
4 changes: 0 additions & 4 deletions c++/src/H5DataType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>

#include "H5Include.h"
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion c++/src/H5DcreatProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion c++/src/H5DxferProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion c++/src/H5Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit a09e1ea

Please sign in to comment.