Commit d71e4501 authored by Brad King's avatar Brad King

IO/GeoJSON: Fix -Wsign-compare warnings

Use Json::Value::ArrayIndex as the loop counter type when using
Json::Value::size() as the loop bound.
parent 4b3c928a
......@@ -424,7 +424,7 @@ ExtractGeoJSONFeatureGeometry(const Json::Value& geometryRoot,
{
//For GeometryCollection
Json::Value geometries = geometryRoot["geometries"];
for (int i = 0; i < geometries.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < geometries.size(); i++)
{
Json::Value child = geometries[i];
this->ExtractGeoJSONFeatureGeometry(child, outputData);
......@@ -479,7 +479,7 @@ bool vtkGeoJSONFeature::IsLineString(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if ( ! IsPoint( child ) )
......@@ -506,7 +506,7 @@ bool vtkGeoJSONFeature::IsMultiLineString(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if ( ! IsLineString( child ) )
......@@ -533,7 +533,7 @@ bool vtkGeoJSONFeature::IsPoint(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if ( ! child.isNumeric() )
......@@ -561,7 +561,7 @@ bool vtkGeoJSONFeature::IsMultiPoint(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if ( ! IsPoint( child ) )
......@@ -588,7 +588,7 @@ bool vtkGeoJSONFeature::IsPolygon(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if( ! IsLineString( child ) )
......@@ -617,7 +617,7 @@ bool vtkGeoJSONFeature::IsMultiPolygon(const Json::Value& root)
return false;
}
for (int i = 0; i < root.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < root.size(); i++)
{
Json::Value child = root[i];
if( ! IsPolygon( child ) )
......
......@@ -179,7 +179,7 @@ GeoJSONReaderInternal::ParseRoot(
}
GeoJSONProperty property;
for (int i = 0; i < rootFeatures.size(); i++)
for (Json::Value::ArrayIndex i = 0; i < rootFeatures.size(); i++)
{
// Append extracted geometry to existing outputData
Json::Value featureNode = rootFeatures[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment