Skip to content

Commit 4495fa0

Browse files
committed
COMP: Fix windows compilation warning
Modules\Filtering\LabelMap\include\itkShapeKeepNObjectsLabelMapFilter.h(156): warning C4269: 'comparator': 'const' automatic data initialized with compiler generated default constructor produces unreliable results
1 parent cc69d1c commit 4495fa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/Filtering/LabelMap/include/itkShapeKeepNObjectsLabelMapFilter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ class ITK_TEMPLATE_EXPORT ShapeKeepNObjectsLabelMapFilter : public InPlaceLabelM
153153
auto end = labelObjects.begin() + m_NumberOfObjects;
154154
if (m_ReverseOrdering)
155155
{
156-
const Functor::LabelObjectReverseComparator<LabelObjectType, TAttributeAccessor> comparator;
156+
const Functor::LabelObjectReverseComparator<LabelObjectType, TAttributeAccessor> comparator{};
157157
std::nth_element(labelObjects.begin(), end, labelObjects.end(), comparator);
158158
}
159159
else
160160
{
161-
const Functor::LabelObjectComparator<LabelObjectType, TAttributeAccessor> comparator;
161+
const Functor::LabelObjectComparator<LabelObjectType, TAttributeAccessor> comparator{};
162162
std::nth_element(labelObjects.begin(), end, labelObjects.end(), comparator);
163163
}
164164
progress.CompletedPixel();

0 commit comments

Comments
 (0)