Skip to content

Commit

Permalink
Merge pull request InsightSoftwareConsortium#4603 from N-Dekker/Rever…
Browse files Browse the repository at this point in the history
…t-C++14-SupportSize-workaround

STYLE: Revert C++14 workaround when using the constexpr `SupportSize`
  • Loading branch information
thewtex authored May 20, 2024
2 parents 311b706 + 4fba8e7 commit ea7b1ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolationWeightFunction
/** Table mapping linear offset to indices. */
const TableType m_OffsetToIndexTable{ [] {
TableType table;
// Note: Copied the constexpr value `SupportSize` to a local variable, to prevent a GCC
// (Ubuntu 7.5.0-3ubuntu1~18.04) link error, "undefined reference to `SupportSize`", and Clang
// (Mac10.13-AppleClang-dbg-x86_64-static) "Undefined symbols for architecture x86_64".
const auto supportSize = SupportSize;
std::copy_n(ZeroBasedIndexRange<SpaceDimension>(supportSize).cbegin(), NumberOfWeights, table.begin());
std::copy_n(ZeroBasedIndexRange<SpaceDimension>(SupportSize).cbegin(), NumberOfWeights, table.begin());
return table;
}() };
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,7 @@ BSplineDeformableTransform<TParametersValueType, VDimension, VSplineOrder>::Tran
this->m_WeightsFunction->Evaluate(index, weights, supportIndex);

// For each dimension, correlate coefficient with weights
constexpr SizeType supportSize = WeightsFunctionType::SupportSize;
const RegionType supportRegion(supportIndex, supportSize);
const RegionType supportRegion(supportIndex, WeightsFunctionType::SupportSize);

outputPoint.Fill(ScalarType{});

Expand Down

0 comments on commit ea7b1ab

Please sign in to comment.