@@ -27,13 +27,13 @@ template <typename TIterator>
2727TIterator *
2828setConnectivity (TIterator * it, bool fullyConnected = false )
2929{
30- typename TIterator::OffsetType offset;
30+
3131 it->ClearActiveList ();
3232 if (!fullyConnected)
3333 {
3434 // only activate the neighbors that are face connected
3535 // to the current pixel. do not include the center pixel
36- offset. Fill ( 0 ) ;
36+ typename TIterator::OffsetType offset{} ;
3737 for (unsigned int d = 0 ; d < TIterator::Dimension; ++d)
3838 {
3939 offset[d] = -1 ;
@@ -50,11 +50,11 @@ setConnectivity(TIterator * it, bool fullyConnected = false)
5050 unsigned int centerIndex = it->GetCenterNeighborhoodIndex ();
5151 for (unsigned int d = 0 ; d < centerIndex * 2 + 1 ; ++d)
5252 {
53- offset = it->GetOffset (d);
53+ typename TIterator::OffsetType offset = it->GetOffset (d);
5454 it->ActivateOffset (offset);
5555 }
56- offset. Fill ( 0 ) ;
57- it->DeactivateOffset (offset );
56+ typename TIterator::OffsetType offset_zeros{} ;
57+ it->DeactivateOffset (offset_zeros );
5858 }
5959 return it;
6060}
@@ -64,13 +64,13 @@ TIterator *
6464setConnectivityPrevious (TIterator * it, bool fullyConnected = false )
6565{
6666 // activate the "previous" neighbours
67- typename TIterator::OffsetType offset;
67+
6868 it->ClearActiveList ();
6969 if (!fullyConnected)
7070 {
7171 // only activate the neighbors that are face connected
7272 // to the current pixel. do not include the center pixel
73- offset. Fill ( 0 ) ;
73+ typename TIterator::OffsetType offset{} ;
7474 for (unsigned int d = 0 ; d < TIterator::Dimension; ++d)
7575 {
7676 offset[d] = -1 ;
@@ -85,11 +85,11 @@ setConnectivityPrevious(TIterator * it, bool fullyConnected = false)
8585 unsigned int centerIndex = it->GetCenterNeighborhoodIndex ();
8686 for (unsigned int d = 0 ; d < centerIndex; ++d)
8787 {
88- offset = it->GetOffset (d);
88+ typename TIterator::OffsetType offset = it->GetOffset (d);
8989 it->ActivateOffset (offset);
9090 }
91- offset. Fill ( 0 ) ;
92- it->DeactivateOffset (offset );
91+ typename TIterator::OffsetType offset_zeros{} ;
92+ it->DeactivateOffset (offset_zeros );
9393 }
9494 return it;
9595}
@@ -99,13 +99,13 @@ TIterator *
9999setConnectivityLater (TIterator * it, bool fullyConnected = false )
100100{
101101 // activate the "later" neighbours
102- typename TIterator::OffsetType offset;
102+
103103 it->ClearActiveList ();
104104 if (!fullyConnected)
105105 {
106106 // only activate the neighbors that are face connected
107107 // to the current pixel. do not include the center pixel
108- offset. Fill ( 0 ) ;
108+ typename TIterator::OffsetType offset{} ;
109109 for (unsigned int d = 0 ; d < TIterator::Dimension; ++d)
110110 {
111111 offset[d] = 1 ;
@@ -120,11 +120,11 @@ setConnectivityLater(TIterator * it, bool fullyConnected = false)
120120 unsigned int centerIndex = it->GetCenterNeighborhoodIndex ();
121121 for (unsigned int d = centerIndex + 1 ; d < 2 * centerIndex + 1 ; ++d)
122122 {
123- offset = it->GetOffset (d);
123+ typename TIterator::OffsetType offset = it->GetOffset (d);
124124 it->ActivateOffset (offset);
125125 }
126- offset. Fill ( 0 ) ;
127- it->DeactivateOffset (offset );
126+ typename TIterator::OffsetType offset_zeros{} ;
127+ it->DeactivateOffset (offset_zeros );
128128 }
129129 return it;
130130}
0 commit comments