InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.38k stars 661 forks source link

HDF5ImageIO: Remove `this->` when accessing its own data, use unique_ptr #4539

Closed N-Dekker closed 3 months ago

N-Dekker commented 3 months ago

Removed this-> when HDF5ImageIO accesses its own data. In general, this-> only seems useful when a class template accessing data of one of its base class templates.

Declared both m_H5File and m_VoxelDataSet as a unique_ptr, following C++ Core Guidelines, "Use unique_ptr or shared_ptr to avoid forgetting to delete objects created using new"