Skip to content
Snippets Groups Projects
Commit 5c97e44a authored by John Tourtellott's avatar John Tourtellott
Browse files

Move variable declaration inside loop to limit its scope

parent 5e1fc1bf
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment