summaryrefslogtreecommitdiffstats
path: root/c++/examples/h5tutr_crtgrpar.cpp
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /c++/examples/h5tutr_crtgrpar.cpp
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'c++/examples/h5tutr_crtgrpar.cpp')
-rw-r--r--c++/examples/h5tutr_crtgrpar.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/c++/examples/h5tutr_crtgrpar.cpp b/c++/examples/h5tutr_crtgrpar.cpp
index 15cf1df..3414cee 100644
--- a/c++/examples/h5tutr_crtgrpar.cpp
+++ b/c++/examples/h5tutr_crtgrpar.cpp
@@ -26,12 +26,12 @@ using namespace H5;
const H5std_string FILE_NAME("h5tutr_groups.h5");
-int main(void)
+int
+main(void)
{
// Try block to detect exceptions raised by any of the calls inside it
- try
- {
+ try {
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately.
@@ -44,7 +44,7 @@ int main(void)
// Create group "MyGroup" in the root group using an absolute name.
- Group group1(file.createGroup( "/MyGroup"));
+ Group group1(file.createGroup("/MyGroup"));
// Create group "Group_A" in group "MyGroup" using an
// absolute name.
@@ -54,7 +54,7 @@ int main(void)
// Create group "Group_B" in group "MyGroup" using a
// relative name.
- Group group3(group1.createGroup ("Group_B"));
+ Group group3(group1.createGroup("Group_B"));
// Close the groups and file.
@@ -66,20 +66,16 @@ int main(void)
} // end of try block
// catch failure caused by the File operations
- catch(FileIException error)
- {
+ catch (FileIException error) {
error.printErrorStack();
return -1;
}
// catch failure caused by the Group operations
- catch(GroupIException error)
- {
+ catch (GroupIException error) {
error.printErrorStack();
return -1;
}
return 0;
}
-
-