Skip to content

Commit 87c2305

Browse files
jhlegarretahjmjohnson
authored andcommitted
COMP: Fix itksys::SystemTools-related return type subscripts.
Fix `itksys::SystemTools`-related return type `[]` operator subscript type. Fixes: ``` Modules/Remote/MinimalPathExtraction/test/MinimalPathTest.h:99:29: error: invalid types 'int[unsigned int]' for array subscript if ( parts[i].length() != 0 ) ^ ``` reported at http://testing.cdash.org/viewBuildError.php?buildid=5792664
1 parent ff6d83b commit 87c2305

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/MinimalPathTest.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ int ReadPathFile( const char * PathFilename, typename PathFilterType::Pointer pa
9191
itksys::SystemTools::ReplaceString( line, "[", "" );
9292
std::vector<itksys::String> parts;
9393
parts = itksys::SystemTools::SplitString( line.c_str(), ']' );
94-
unsigned int numNonNullParts = 0;
94+
std::vector<std::string>::size_type numNonNullParts = 0;
9595
for (auto & part : parts)
9696
if ( part.length() != 0 ) numNonNullParts++;
97-
for (unsigned int i=0; i<numNonNullParts; i++)
97+
for (std::vector<std::string>::size_type i=0; i<numNonNullParts; i++)
9898
{
9999
if ( parts[i].length() != 0 )
100100
{
101101
typename PathFilterType::PointType point;
102102
std::vector<itksys::String> partsPoint;
103103
partsPoint = itksys::SystemTools::SplitString( parts[i].c_str(), ',' );
104-
for (unsigned int j=0; j<partsPoint.size(); j++)
104+
for (std::vector<std::string>::size_type j=0; j<partsPoint.size(); j++)
105105
point[j] = std::stod( partsPoint[j].c_str() );
106106
if ( i==0 ) info->SetStartPoint( point );
107107
else if ( i == numNonNullParts - 1 ) info->SetEndPoint( point );

0 commit comments

Comments
 (0)