Clang-format of source files
This commit is contained in:
@@ -27,7 +27,7 @@ namespace H5 {
|
||||
// in "H5PredType.cpp" for information.
|
||||
|
||||
// Initialize a pointer for the constant
|
||||
LinkAccPropList* LinkAccPropList::DEFAULT_ = 0;
|
||||
LinkAccPropList *LinkAccPropList::DEFAULT_ = 0;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LinkAccPropList::getConstant
|
||||
@@ -40,13 +40,13 @@ LinkAccPropList* LinkAccPropList::DEFAULT_ = 0;
|
||||
// happen.
|
||||
// Programmer Binh-Minh Ribler - December, 2016
|
||||
//--------------------------------------------------------------------------
|
||||
LinkAccPropList* LinkAccPropList::getConstant()
|
||||
LinkAccPropList *
|
||||
LinkAccPropList::getConstant()
|
||||
{
|
||||
// Tell the C library not to clean up, H5Library::termH5cpp will call
|
||||
// H5close - more dependency if use H5Library::dontAtExit()
|
||||
if (!IdComponent::H5dontAtexit_called)
|
||||
{
|
||||
(void) H5dont_atexit();
|
||||
if (!IdComponent::H5dontAtexit_called) {
|
||||
(void)H5dont_atexit();
|
||||
IdComponent::H5dontAtexit_called = true;
|
||||
}
|
||||
|
||||
@@ -55,8 +55,9 @@ LinkAccPropList* LinkAccPropList::getConstant()
|
||||
if (DEFAULT_ == 0)
|
||||
DEFAULT_ = new LinkAccPropList(H5P_LINK_ACCESS);
|
||||
else
|
||||
throw PropListIException("LinkAccPropList::getConstant", "LinkAccPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return(DEFAULT_);
|
||||
throw PropListIException("LinkAccPropList::getConstant",
|
||||
"LinkAccPropList::getConstant is being invoked on an allocated DEFAULT_");
|
||||
return (DEFAULT_);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -66,7 +67,8 @@ LinkAccPropList* LinkAccPropList::getConstant()
|
||||
// exception H5::PropListIException
|
||||
// Programmer Binh-Minh Ribler - December, 2016
|
||||
//--------------------------------------------------------------------------
|
||||
void LinkAccPropList::deleteConstants()
|
||||
void
|
||||
LinkAccPropList::deleteConstants()
|
||||
{
|
||||
if (DEFAULT_ != 0)
|
||||
delete DEFAULT_;
|
||||
@@ -75,7 +77,7 @@ void LinkAccPropList::deleteConstants()
|
||||
//--------------------------------------------------------------------------
|
||||
// Purpose: Constant for default property
|
||||
//--------------------------------------------------------------------------
|
||||
const LinkAccPropList& LinkAccPropList::DEFAULT = *getConstant();
|
||||
const LinkAccPropList &LinkAccPropList::DEFAULT = *getConstant();
|
||||
|
||||
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
@@ -92,7 +94,7 @@ LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS) {}
|
||||
///\param original - IN: LinkAccPropList instance to copy
|
||||
// Programmer Binh-Minh Ribler - December, 2016
|
||||
//--------------------------------------------------------------------------
|
||||
LinkAccPropList::LinkAccPropList(const LinkAccPropList& original) : PropList(original) {}
|
||||
LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(original) {}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: LinkAccPropList overloaded constructor
|
||||
@@ -111,12 +113,12 @@ LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id) {}
|
||||
///\exception H5::PropListIException
|
||||
// Programmer Binh-Minh Ribler - March 1, 2017
|
||||
//--------------------------------------------------------------------------
|
||||
void LinkAccPropList::setNumLinks(size_t nlinks) const
|
||||
void
|
||||
LinkAccPropList::setNumLinks(size_t nlinks) const
|
||||
{
|
||||
herr_t ret_value = H5Pset_nlinks(id, nlinks);
|
||||
// Throw exception if H5Pset_nlinks returns failure
|
||||
if (ret_value < 0)
|
||||
{
|
||||
if (ret_value < 0) {
|
||||
throw PropListIException("setNumLinks", "H5Pset_nlinks failed");
|
||||
}
|
||||
}
|
||||
@@ -129,16 +131,16 @@ void LinkAccPropList::setNumLinks(size_t nlinks) const
|
||||
///\exception H5::PropListIException
|
||||
// Programmer Binh-Minh Ribler - March 1, 2017
|
||||
//--------------------------------------------------------------------------
|
||||
size_t LinkAccPropList::getNumLinks() const
|
||||
size_t
|
||||
LinkAccPropList::getNumLinks() const
|
||||
{
|
||||
size_t nlinks = 0;
|
||||
size_t nlinks = 0;
|
||||
herr_t ret_value = H5Pget_nlinks(id, &nlinks);
|
||||
// Throw exception if H5Pget_nlinks returns failure
|
||||
if (ret_value < 0)
|
||||
{
|
||||
if (ret_value < 0) {
|
||||
throw PropListIException("getNumLinks", "H5Pget_nlinks failed");
|
||||
}
|
||||
return(nlinks);
|
||||
return (nlinks);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -148,4 +150,4 @@ size_t LinkAccPropList::getNumLinks() const
|
||||
//--------------------------------------------------------------------------
|
||||
LinkAccPropList::~LinkAccPropList() {}
|
||||
|
||||
} // end namespace
|
||||
} // namespace H5
|
||||
|
||||
Reference in New Issue
Block a user