diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 00:39:37 (GMT) |
commit | feb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch) | |
tree | e15d7e751af4e3c42e77ea955d91db4cf27a71cf /c++/src/H5VarLenType.cpp | |
parent | bdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff) | |
download | hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2 |
Formats the source and updates the gcc warning pragmas
Diffstat (limited to 'c++/src/H5VarLenType.cpp')
-rw-r--r-- | c++/src/H5VarLenType.cpp | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index 094af61..13d1a5f 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -33,7 +33,9 @@ namespace H5 { // Function: VarLenType default constructor ///\brief Default constructor: Creates a stub variable-length datatype. //-------------------------------------------------------------------------- -VarLenType::VarLenType() : DataType() {} +VarLenType::VarLenType() : DataType() +{ +} //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor @@ -42,14 +44,18 @@ VarLenType::VarLenType() : DataType() {} ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {} +VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) +{ +} //-------------------------------------------------------------------------- // Function: VarLenType copy constructor ///\brief Copy constructor: same HDF5 object as \a original // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const VarLenType& original) : DataType(original) {} +VarLenType::VarLenType(const VarLenType &original) : DataType(original) +{ +} //-------------------------------------------------------------------------- // Function: VarLenType overloaded constructor @@ -63,13 +69,11 @@ VarLenType::VarLenType(const VarLenType& original) : DataType(original) {} // -BMR, Sep, 2017 // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const DataType* base_type) : DataType() +VarLenType::VarLenType(const DataType *base_type) : DataType() { id = H5Tvlen_create(base_type->getId()); - if (id < 0) - { - throw DataTypeIException("VarLenType constructor", - "H5Tvlen_create returns negative value"); + if (id < 0) { + throw DataTypeIException("VarLenType constructor", "H5Tvlen_create returns negative value"); } } @@ -81,13 +85,11 @@ VarLenType::VarLenType(const DataType* base_type) : DataType() ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const DataType& base_type) : DataType() +VarLenType::VarLenType(const DataType &base_type) : DataType() { id = H5Tvlen_create(base_type.getId()); - if (id < 0) - { - throw DataTypeIException("VarLenType constructor", - "H5Tvlen_create returns negative value"); + if (id < 0) { + throw DataTypeIException("VarLenType constructor", "H5Tvlen_create returns negative value"); } } @@ -105,7 +107,7 @@ VarLenType::VarLenType(const DataType& base_type) : DataType() // improve usability. // -BMR, Dec 2016 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType() +VarLenType::VarLenType(const H5Location &loc, const char *dtype_name) : DataType() { id = p_opentype(loc, dtype_name); } @@ -124,7 +126,7 @@ VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType // to improve usability. // -BMR, Dec 2016 //-------------------------------------------------------------------------- -VarLenType::VarLenType(const H5Location& loc, const H5std_string& dtype_name) : DataType() +VarLenType::VarLenType(const H5Location &loc, const H5std_string &dtype_name) : DataType() { id = p_opentype(loc, dtype_name.c_str()); } @@ -137,7 +139,8 @@ VarLenType::VarLenType(const H5Location& loc, const H5std_string& dtype_name) : ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - Aug 2017 //-------------------------------------------------------------------------- -DataType* VarLenType::decode() const +DataType * +VarLenType::decode() const { hid_t encoded_vltype_id = H5I_INVALID_HID; try { @@ -148,7 +151,7 @@ DataType* VarLenType::decode() const } VarLenType *encoded_vltype = new VarLenType; encoded_vltype->p_setId(encoded_vltype_id); - return(encoded_vltype); + return (encoded_vltype); } //-------------------------------------------------------------------------- @@ -156,6 +159,8 @@ DataType* VarLenType::decode() const ///\brief Properly terminates access to this datatype. // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- -VarLenType::~VarLenType() {} +VarLenType::~VarLenType() +{ +} -} // end namespace +} // namespace H5 |