diff --git a/src/h5cpp/attribute/attribute.cpp b/src/h5cpp/attribute/attribute.cpp index f27e83d377..5b6cd17df0 100644 --- a/src/h5cpp/attribute/attribute.cpp +++ b/src/h5cpp/attribute/attribute.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +//#include namespace hdf5 { namespace attribute { @@ -97,15 +97,6 @@ const node::Link &Attribute::parent_link() const noexcept return parent_link_; } -void Attribute::write(const char *data) const -{ - write(std::string(data)); -} - -void Attribute::write(const char *data,const datatype::Datatype &mem_type) const -{ - write(std::string(data),mem_type); -} void Attribute::check_size(const dataspace::Dataspace &mem_space, const dataspace::Dataspace &file_space, diff --git a/src/h5cpp/attribute/attribute.hpp b/src/h5cpp/attribute/attribute.hpp index 98d21fff5c..f29e7d19b1 100644 --- a/src/h5cpp/attribute/attribute.hpp +++ b/src/h5cpp/attribute/attribute.hpp @@ -40,7 +40,7 @@ #include #include #include -#include +//#include namespace hdf5 { namespace attribute { @@ -143,7 +143,10 @@ class DLL_EXPORT Attribute //! //! \throws std::runtime_error in case of a failure //! - void write(const char *data) const; + void write(const char *data) const + { + write(std::string(data)); + } //! //! \brief write from initializer list @@ -194,7 +197,11 @@ class DLL_EXPORT Attribute //! template void write(const T& data,const datatype::Datatype &mem_type) const; - void write(const char *data,const datatype::Datatype &mem_type) const; + void write(const char *data,const datatype::Datatype &mem_type) const + { + write(std::string(data),mem_type); + } + template void read(T &data) const; diff --git a/test/attribute/attribute_fixed_string_io.cpp b/test/attribute/attribute_fixed_string_io.cpp index 2c6d6c655d..a86c63b234 100644 --- a/test/attribute/attribute_fixed_string_io.cpp +++ b/test/attribute/attribute_fixed_string_io.cpp @@ -26,7 +26,7 @@ // #include #include -#include +#include #include #include diff --git a/test/attribute/attribute_management_test.cpp b/test/attribute/attribute_management_test.cpp index 2f136e8745..928c3f1e25 100644 --- a/test/attribute/attribute_management_test.cpp +++ b/test/attribute/attribute_management_test.cpp @@ -24,6 +24,7 @@ // #include #include +#include using namespace hdf5; diff --git a/test/attribute/attribute_scalar_io_test.cpp b/test/attribute/attribute_scalar_io_test.cpp index f82a3352a1..ac98e63c28 100644 --- a/test/attribute/attribute_scalar_io_test.cpp +++ b/test/attribute/attribute_scalar_io_test.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include using namespace hdf5; diff --git a/test/attribute/attribute_test.cpp b/test/attribute/attribute_test.cpp index 3be727d1a2..32f9841a91 100644 --- a/test/attribute/attribute_test.cpp +++ b/test/attribute/attribute_test.cpp @@ -29,6 +29,7 @@ #include #include #include +#include using namespace hdf5; diff --git a/test/attribute/attribute_variable_string_io.cpp b/test/attribute/attribute_variable_string_io.cpp index f5cd7e8ba1..e2b31a8eae 100644 --- a/test/attribute/attribute_variable_string_io.cpp +++ b/test/attribute/attribute_variable_string_io.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include using namespace hdf5; diff --git a/test/contrib/nexus/attribute_h5py_bool_test.cpp b/test/contrib/nexus/attribute_h5py_bool_test.cpp index 0f1d562aa4..0252ab61e1 100644 --- a/test/contrib/nexus/attribute_h5py_bool_test.cpp +++ b/test/contrib/nexus/attribute_h5py_bool_test.cpp @@ -24,6 +24,7 @@ // #include #include +#include #include using namespace hdf5; diff --git a/test/contrib/nexus/attribute_pniio_bool_test.cpp b/test/contrib/nexus/attribute_pniio_bool_test.cpp index a58f6694a7..01cf6de9a2 100644 --- a/test/contrib/nexus/attribute_pniio_bool_test.cpp +++ b/test/contrib/nexus/attribute_pniio_bool_test.cpp @@ -24,6 +24,7 @@ // #include #include +#include #include #include diff --git a/test/contrib/nexus/dataset_h5py_bool_test.cpp b/test/contrib/nexus/dataset_h5py_bool_test.cpp index 244919049b..06e35d2d13 100644 --- a/test/contrib/nexus/dataset_h5py_bool_test.cpp +++ b/test/contrib/nexus/dataset_h5py_bool_test.cpp @@ -26,6 +26,7 @@ // #include #include +#include #include "../../utilities.hpp" #include "utilities.hpp" diff --git a/test/contrib/nexus/dataset_pniio_bool_test.cpp b/test/contrib/nexus/dataset_pniio_bool_test.cpp index 71faa11c44..9db6121b39 100644 --- a/test/contrib/nexus/dataset_pniio_bool_test.cpp +++ b/test/contrib/nexus/dataset_pniio_bool_test.cpp @@ -26,6 +26,7 @@ // #include #include +#include #include "utilities.hpp" #include "../../utilities.hpp" diff --git a/test/contrib/nexus/ebool_test.cpp b/test/contrib/nexus/ebool_test.cpp index cf7d59bf6d..9bdf45791d 100644 --- a/test/contrib/nexus/ebool_test.cpp +++ b/test/contrib/nexus/ebool_test.cpp @@ -29,7 +29,7 @@ #define CATCH_CONFIG_MAIN #include #include -#include +#include #include diff --git a/test/file/file_image_test.cpp b/test/file/file_image_test.cpp index 040937cc4c..e28a662121 100644 --- a/test/file/file_image_test.cpp +++ b/test/file/file_image_test.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include using namespace hdf5; diff --git a/test/file/file_test.cpp b/test/file/file_test.cpp index 09ba4969ce..d5efc5a796 100644 --- a/test/file/file_test.cpp +++ b/test/file/file_test.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using namespace hdf5; diff --git a/test/node/chunked_dataset_test.cpp b/test/node/chunked_dataset_test.cpp index ccbf0d12ae..116d1ff2dd 100644 --- a/test/node/chunked_dataset_test.cpp +++ b/test/node/chunked_dataset_test.cpp @@ -25,6 +25,7 @@ // #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_array_type_io.cpp b/test/node/dataset_array_type_io.cpp index 022063f2da..31ee2e82aa 100644 --- a/test/node/dataset_array_type_io.cpp +++ b/test/node/dataset_array_type_io.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include template struct Vector { diff --git a/test/node/dataset_bool_io.cpp b/test/node/dataset_bool_io.cpp index aeec388f14..76a0069ca8 100644 --- a/test/node/dataset_bool_io.cpp +++ b/test/node/dataset_bool_io.cpp @@ -25,6 +25,7 @@ // #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_const_data.cpp b/test/node/dataset_const_data.cpp index aef03fa14b..4ffb8fbcd4 100644 --- a/test/node/dataset_const_data.cpp +++ b/test/node/dataset_const_data.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include using namespace hdf5; diff --git a/test/node/dataset_direct_chunk_test.cpp b/test/node/dataset_direct_chunk_test.cpp index 9dfd2f6003..f69d235503 100644 --- a/test/node/dataset_direct_chunk_test.cpp +++ b/test/node/dataset_direct_chunk_test.cpp @@ -26,6 +26,7 @@ // #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_dynamic_type_io.cpp b/test/node/dataset_dynamic_type_io.cpp index a0f7733313..48cb91e259 100644 --- a/test/node/dataset_dynamic_type_io.cpp +++ b/test/node/dataset_dynamic_type_io.cpp @@ -28,6 +28,7 @@ #include #include #include +#include struct Flip { public: diff --git a/test/node/dataset_extent_test.cpp b/test/node/dataset_extent_test.cpp index a29851adc1..bebb2332a2 100644 --- a/test/node/dataset_extent_test.cpp +++ b/test/node/dataset_extent_test.cpp @@ -26,6 +26,7 @@ #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_fixed_string_io.cpp b/test/node/dataset_fixed_string_io.cpp index 4e93adf2d7..cec21aa2ce 100644 --- a/test/node/dataset_fixed_string_io.cpp +++ b/test/node/dataset_fixed_string_io.cpp @@ -25,6 +25,7 @@ // #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_h5py_string_compat_test.cpp b/test/node/dataset_h5py_string_compat_test.cpp index 7f3b9352a4..3cb35f50d8 100644 --- a/test/node/dataset_h5py_string_compat_test.cpp +++ b/test/node/dataset_h5py_string_compat_test.cpp @@ -25,6 +25,7 @@ // #include #include +#include #include using namespace hdf5; diff --git a/test/node/dataset_partial_io_test.cpp b/test/node/dataset_partial_io_test.cpp index df559e3839..375b772430 100644 --- a/test/node/dataset_partial_io_test.cpp +++ b/test/node/dataset_partial_io_test.cpp @@ -28,7 +28,7 @@ // #include #include -#include +#include using namespace hdf5; diff --git a/test/node/dataset_test.cpp b/test/node/dataset_test.cpp index 6e98a82d64..21d5b1781b 100644 --- a/test/node/dataset_test.cpp +++ b/test/node/dataset_test.cpp @@ -26,6 +26,7 @@ #include #include +#include using namespace hdf5; diff --git a/test/node/dataset_variable_string_io.cpp b/test/node/dataset_variable_string_io.cpp index 60d715165e..051fb68c5d 100644 --- a/test/node/dataset_variable_string_io.cpp +++ b/test/node/dataset_variable_string_io.cpp @@ -24,7 +24,7 @@ // Created on: Oct 25, 2017 // #include -#include +#include #include using namespace hdf5; diff --git a/test/node/dataset_vlen_array_io.cpp b/test/node/dataset_vlen_array_io.cpp index 0c13cf5c98..599ab7bf34 100644 --- a/test/node/dataset_vlen_array_io.cpp +++ b/test/node/dataset_vlen_array_io.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace hdf5; diff --git a/test/node/node_test.cpp b/test/node/node_test.cpp index bf2bf395a2..effee3f02b 100644 --- a/test/node/node_test.cpp +++ b/test/node/node_test.cpp @@ -27,6 +27,7 @@ #include #include #include +#include using namespace hdf5;