summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-03-17 15:25:39 (GMT)
committerGitHub <noreply@github.com>2021-03-17 15:25:39 (GMT)
commitc6e4e535469beaa3418b34863d455c8f17ade3f5 (patch)
tree11c5cf08959881ee6cff2df81b1d9f873ddd3dcf /hl/c++
parentf6d919a2ab0034a1ee76ca2d5f59f4d8114c4952 (diff)
downloadhdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.zip
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.gz
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.bz2
Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/src/H5PacketTable.cpp23
-rw-r--r--hl/c++/src/H5PacketTable.h9
-rw-r--r--hl/c++/test/ptableTest.cpp5
3 files changed, 29 insertions, 8 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp
index eca3ed1..0f47b0d 100644
--- a/hl/c++/src/H5PacketTable.cpp
+++ b/hl/c++/src/H5PacketTable.cpp
@@ -32,15 +32,24 @@
* Opens an existing packet table, which can contain either fixed-length or
* variable-length packets.
*/
-PacketTable::PacketTable(hid_t fileID, const char *name) { table_id = H5PTopen(fileID, name); }
+PacketTable::PacketTable(hid_t fileID, const char *name)
+{
+ table_id = H5PTopen(fileID, name);
+}
/* "Open" Constructor - will be deprecated because of char* name */
-PacketTable::PacketTable(hid_t fileID, char *name) { table_id = H5PTopen(fileID, name); }
+PacketTable::PacketTable(hid_t fileID, char *name)
+{
+ table_id = H5PTopen(fileID, name);
+}
/* Destructor
* Cleans up the packet table
*/
-PacketTable::~PacketTable() { H5PTclose(table_id); }
+PacketTable::~PacketTable()
+{
+ H5PTclose(table_id);
+}
/* IsValid
* Returns true if this packet table is valid, false otherwise.
@@ -206,10 +215,14 @@ FL_PacketTable::FL_PacketTable(hid_t fileID, char *name, hid_t dtypeID, hsize_t
* Opens an existing fixed-length packet table.
* Fails if the packet table specified is variable-length.
*/
-FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name) : PacketTable(fileID, name) {}
+FL_PacketTable::FL_PacketTable(hid_t fileID, const char *name) : PacketTable(fileID, name)
+{
+}
/* "Open" Constructor - will be deprecated because of char* name */
-FL_PacketTable::FL_PacketTable(hid_t fileID, char *name) : PacketTable(fileID, name) {}
+FL_PacketTable::FL_PacketTable(hid_t fileID, char *name) : PacketTable(fileID, name)
+{
+}
/* AppendPacket
* Adds a single packet to the packet table. Takes a pointer
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h
index 825caf7..a73b4c9 100644
--- a/hl/c++/src/H5PacketTable.h
+++ b/hl/c++/src/H5PacketTable.h
@@ -33,7 +33,10 @@ class H5_HLCPPDLL PacketTable {
/* Null constructor
* Sets table_id to "invalid"
*/
- PacketTable() { table_id = H5I_BADID; }
+ PacketTable()
+ {
+ table_id = H5I_BADID;
+ }
/* "Open" Constructor
* Opens an existing packet table, which can contain either fixed-length or
@@ -163,7 +166,9 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable {
/* Destructor
* Cleans up the packet table
*/
- virtual ~FL_PacketTable() {}
+ virtual ~FL_PacketTable()
+ {
+ }
/* AppendPacket
* Adds a single packet to the packet table. Takes a pointer
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index 47c6562..2600367 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -191,7 +191,10 @@ TestCompoundDatatype()
error:
- H5E_BEGIN_TRY { H5Tclose(dtypeID); }
+ H5E_BEGIN_TRY
+ {
+ H5Tclose(dtypeID);
+ }
H5E_END_TRY;
H5_FAILED();