Skip to content

Commit

Permalink
STYLE: Make data of PixelReferenceWrapper (in ImageBufferRange) private
Browse files Browse the repository at this point in the history
PixelReferenceWrapper is itself already private, nested inside
QualifiedIterator, which is private as well, nested inside ImageBufferRange.

Fixed a LLVM 15.04 clang-tidy warning:
> member variable 'm_Pixel' has public visibility [misc-non-private-member-variables-in-classes]
  • Loading branch information
N-Dekker committed Dec 20, 2022
1 parent cf19aba commit ca965f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Modules/Core/Common/include/itkImageBufferRange.h
Expand Up @@ -251,8 +251,6 @@ class ImageBufferRange final
class PixelReferenceWrapper final
{
public:
QualifiedPixelType & m_Pixel;

// Wraps the pixel reference that is specified by the first argument.
// Note: the second parameter is unused, but it is there just to support
// the use case of iterator::operator*(), which uses either
Expand All @@ -266,6 +264,9 @@ class ImageBufferRange final

// Converts implicitly to a reference to the pixel.
operator QualifiedPixelType &() const noexcept { return m_Pixel; }

private:
QualifiedPixelType & m_Pixel;
};


Expand Down

0 comments on commit ca965f3

Please sign in to comment.