Skip to content

Commit

Permalink
STYLE: SplitRequestedRegion replace C-style (double) cast w/ static_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Dec 9, 2023
1 parent e6971b0 commit acf33fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Common/ImageSamplers/itkImageToVectorContainerFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ ImageToVectorContainerFilter<TInputImage, TOutputVectorContainer>::SplitRequeste

// determine the actual number of pieces that will be generated
const typename TInputImage::SizeType::SizeValueType range = requestedRegionSize[splitAxis];
const unsigned int valuesPerThread = Math::Ceil<unsigned int>(range / (double)numberOfSplits);
const unsigned int maxThreadIdUsed = Math::Ceil<unsigned int>(range / (double)valuesPerThread) - 1;
const unsigned int valuesPerThread = Math::Ceil<unsigned int>(range / static_cast<double>(numberOfSplits));
const unsigned int maxThreadIdUsed = Math::Ceil<unsigned int>(range / static_cast<double>(valuesPerThread)) - 1;

// Split the region
if (threadId < maxThreadIdUsed)
Expand Down

0 comments on commit acf33fc

Please sign in to comment.