Commit 5c97e44a authored by John Tourtellott's avatar John Tourtellott

Move variable declaration inside loop to limit its scope

parent 5e1fc1bf
......@@ -755,9 +755,9 @@ int vtkGDALRasterReader::RequestData(vtkInformation* vtkNotUsed(request),
noDataArray->SetName("NO_DATA_VALUE");
noDataArray->SetNumberOfComponents(1);
noDataArray->SetNumberOfTuples(this->Implementation->NumberOfBands);
int success = 0;
for (int i=0; i<this->Implementation->NumberOfBands; i++)
{
int success = 0;
double noDataValue = this->Implementation->GDALData->GetRasterBand(
i+1)->GetNoDataValue(&success);
if (!success)
......
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