Skip to content

Commit cb2db34

Browse files
N-Dekkerdzenanz
authored andcommitted
STYLE: Let ImageRegionRange::size() use CalculateProductOfElements()
Instead of `std::accumulate`. For the sake of simplicity.
1 parent 6529cb9 commit cb2db34

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Modules/Core/Common/include/itkImageRegionRange.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <cstddef> // For ptrdiff_t.
2525
#include <iterator> // For bidirectional_iterator_tag.
2626
#include <functional> // For multiplies.
27-
#include <numeric> // For accumulate.
2827
#include <type_traits> // For conditional, enable_if, and is_const.
2928

3029
#include "itkImageHelper.h"
@@ -440,8 +439,7 @@ class ImageRegionRange final
440439
[[nodiscard]] size_t
441440
size() const noexcept
442441
{
443-
return std::accumulate(
444-
m_IterationRegionSize.begin(), m_IterationRegionSize.end(), size_t{ 1 }, std::multiplies<size_t>{});
442+
return m_IterationRegionSize.CalculateProductOfElements();
445443
}
446444

447445

0 commit comments

Comments
 (0)