InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.4k stars 662 forks source link

STYLE: Remove temporary vnl_vector_ref from const GetVnlVector overloads #4482

Closed N-Dekker closed 6 months ago

N-Dekker commented 6 months ago

The three "const" overloads of GetVnlVector() return an vnl_vector, not a vnl_vector_ref, so it is not necessary for these overloads to internally create a temporary vnl_vector_ref.


For the record, the original approach for those overloads to create a vnl_vector_ref and convert it to a vnl_vector was by commit a1cd655268082d6a1125ca7c83bbaf59bc0f32ed, "OPT: optimizations", Jim Miller, 2004.