Skip to content

Commit

Permalink
STYLE: Mimic code that was reviewed for the upstream HDF5 source
Browse files Browse the repository at this point in the history
  • Loading branch information
Leengit committed Mar 30, 2021
1 parent 4f64c6c commit 090399d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,10 @@ DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs(), id(origina
DataSet &
DataSet::operator=(const DataSet &original)
{
// Wrap the changes to `*this` by an incremented reference count for
// `original` to prevent trouble in the case that `*this` and
// `original` share reference counts or memory in any relevant
// sense.
original.incRefCount();
decRefCount(); // for old value of id
id = original.id;
incRefCount(); // for new value of id
original.decRefCount();
return *this;
if (this != &original) {
setId(original.id);
}
return (*this);
}

//--------------------------------------------------------------------------
Expand Down

0 comments on commit 090399d

Please sign in to comment.