Skip to content

Commit

Permalink
STYLE: Improve const-correctness of protected CompositeTransform members
Browse files Browse the repository at this point in the history
- Added `const` to reference returned by `GetTransformsToOptimizeQueue()`
- Made `m_TransformsToOptimizeFlags` non-`mutable`
  • Loading branch information
N-Dekker authored and dzenanz committed Sep 21, 2021
1 parent 9599fc6 commit a4693b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Modules/Core/Transform/include/itkCompositeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,11 @@ class ITK_TEMPLATE_EXPORT CompositeTransform : public MultiTransform<TParameters
}

/** Get a list of transforms to optimize. Helper function. */
TransformQueueType &
const TransformQueueType &
GetTransformsToOptimizeQueue() const;

mutable TransformQueueType m_TransformsToOptimizeQueue;
mutable TransformsToOptimizeFlagsType m_TransformsToOptimizeFlags;
mutable TransformQueueType m_TransformsToOptimizeQueue;
TransformsToOptimizeFlagsType m_TransformsToOptimizeFlags;

private:
mutable ModifiedTimeType m_PreviousTransformsToOptimizeUpdateTime;
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Transform/include/itkCompositeTransform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ CompositeTransform<TParametersValueType, NDimensions>::UpdateTransformParameters


template <typename TParametersValueType, unsigned int NDimensions>
typename CompositeTransform<TParametersValueType, NDimensions>::TransformQueueType &
const typename CompositeTransform<TParametersValueType, NDimensions>::TransformQueueType &
CompositeTransform<TParametersValueType, NDimensions>::GetTransformsToOptimizeQueue() const
{
/* Update the list of transforms to use for optimization only if
Expand Down

0 comments on commit a4693b5

Please sign in to comment.