summaryrefslogtreecommitdiffstats
path: root/c++/examples
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-03-12 17:58:10 (GMT)
committerGitHub <noreply@github.com>2021-03-12 17:58:10 (GMT)
commitb42635ad88ef577442b3b600643899b7754fd17c (patch)
tree71c7033d5e24ba26eca8c48762a14118d43bb5d5 /c++/examples
parentbf4399bd25eef9886dab5dcb115e2e439e3a2ac9 (diff)
downloadhdf5-b42635ad88ef577442b3b600643899b7754fd17c.zip
hdf5-b42635ad88ef577442b3b600643899b7754fd17c.tar.gz
hdf5-b42635ad88ef577442b3b600643899b7754fd17c.tar.bz2
Hdf5 merge issue 458 v110 (#465)
* close #195. (#196) * Update HDF5PluginMacros.cmake * Update HDF5PluginMacros.cmake * 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. * Update license url (#332) * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories. * 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> * Fix clang-tidy suspicious string compare in H5A.c missed in merge. Co-authored-by: H. Joe Lee <hyoklee@hdfgroup.org> Co-authored-by: Sean McBride <sean@rogue-research.com>
Diffstat (limited to 'c++/examples')
-rw-r--r--c++/examples/chunks.cpp4
-rw-r--r--c++/examples/compound.cpp4
-rw-r--r--c++/examples/create.cpp4
-rw-r--r--c++/examples/extend_ds.cpp4
-rw-r--r--c++/examples/h5group.cpp4
-rw-r--r--c++/examples/readdata.cpp4
-rw-r--r--c++/examples/testh5c++.sh.in36
-rw-r--r--c++/examples/writedata.cpp4
8 files changed, 6 insertions, 58 deletions
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp
index 365a7da..3717fcb 100644
--- a/c++/examples/chunks.cpp
+++ b/c++/examples/chunks.cpp
@@ -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;
diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp
index 31a572a..8975845 100644
--- a/c++/examples/compound.cpp
+++ b/c++/examples/compound.cpp
@@ -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;
diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp
index ef2de36..e55230f 100644
--- a/c++/examples/create.cpp
+++ b/c++/examples/create.cpp
@@ -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"
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index e69c1c0..24f5f3e 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -18,11 +18,7 @@
*
*/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
using std::cout;
diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp
index ec8b400..3c7f260 100644
--- a/c++/examples/h5group.cpp
+++ b/c++/examples/h5group.cpp
@@ -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;
diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp
index 7441420..e247a8e 100644
--- a/c++/examples/readdata.cpp
+++ b/c++/examples/readdata.cpp
@@ -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;
diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in
index 46fe5eb..44dc9e7 100644
--- a/c++/examples/testh5c++.sh.in
+++ b/c++/examples/testh5c++.sh.in
@@ -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"
@@ -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;
@@ -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;
@@ -142,11 +122,7 @@ EOF
cat > $hdf5main <<EOF
#include <string>
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include "H5Cpp.h"
diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp
index ddd3460..f2b715a 100644
--- a/c++/examples/writedata.cpp
+++ b/c++/examples/writedata.cpp
@@ -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;