Skip to content

Commit 00844a2

Browse files
authored
Merge pull request InsightSoftwareConsortium#5794 from N-Dekker/ImageConstIterator-GetIndex-remove-const-and-static_cast
Remove const from return type of `ImageConstIterator::GetIndex()`, remove static_cast
2 parents ba83803 + e9dc0f7 commit 00844a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/Core/Common/include/itkImageConstIterator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator
299299
* This causes the index to be calculated from pointer arithmetic and is
300300
* therefore an expensive operation.
301301
* \sa SetIndex */
302-
[[nodiscard]] const IndexType
302+
[[nodiscard]] IndexType
303303
GetIndex() const
304304
{
305-
return m_Image->ComputeIndex(static_cast<OffsetValueType>(m_Offset));
305+
return m_Image->ComputeIndex(m_Offset);
306306
}
307307

308308
/** Set the index. No bounds checking is performed.

0 commit comments

Comments
 (0)