Skip to content

Conversation

@N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Nov 9, 2024

Using Notepad++, Replace in Files, doing:

    Find what: ^( [ ]+)(auto \w+[ ]+= .+::Filled\(\d+\);)
    Replace with: $1constexpr $2
    Filters: itk*.* !+\test
    Directory: D:\src\ITK\Modules
    [v] Match case
    (*) Regular expression

Manually excluded cases that did not compile, in

    itkLabelMapContourOverlayImageFilter.hxx
    itkBSplineControlPointImageFilter.hxx
    itkBSplineScatteredDataPointSetToImageFilter.hxx
    itkTileImageFilter.hxx
    itkFFTDiscreteGaussianImageFilter.hxx
    itkSLICImageFilter.hxx

 - Follow-up to pull request InsightSoftwareConsortium#4930
commit fd14482
"STYLE: Add constexpr to variables initialized by MakeFilled"
`Size::Filled(VRadius)` can be evaluated at compile-time.
`SizeType::Filled(SplineOrder + 1)` can be evaluated at compile-time.
@github-actions github-actions bot added area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module area:Numerics Issues affecting the Numerics module labels Nov 9, 2024
@N-Dekker N-Dekker marked this pull request as ready for review November 9, 2024 22:11
@hjmjohnson hjmjohnson merged commit dab1987 into InsightSoftwareConsortium:master Nov 11, 2024
15 checks passed
@N-Dekker N-Dekker deleted the Add-constexpr-to-variables-initialized-by-Filled branch November 15, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants