Skip to content

Commit

Permalink
STY: Fix if indentation (from PR review)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmichel-otb committed Jul 7, 2016
1 parent 27ab9f5 commit 07a3c7e
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions gdal/gcore/gdaldataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3299,25 +3299,22 @@ void GDALDataset::ReportError(CPLErr eErrClass, CPLErrorNum err_no, const char *
char ** GDALDataset::GetMetadata(const char * pszDomain)
{
if( pszDomain != NULL && EQUAL(pszDomain, "DERIVED_SUBDATASETS") )
{
papoDerivedMetadataList.Clear();



// First condition: at least one raster band
if(GetRasterCount()>0)
{
papoDerivedMetadataList.Clear();

// First condition: at least one raster band
if(GetRasterCount()>0)
{
for(unsigned int derivedId = 0; derivedId<NB_DERIVED_DATASETS;++derivedId)
for(unsigned int derivedId = 0; derivedId<NB_DERIVED_DATASETS;++derivedId)
{
papoDerivedMetadataList.SetNameValue(CPLSPrintf("DERIVED_SUBDATASET_%i_NAME",derivedId),CPLSPrintf("DERIVED_SUBDATASET:%s:%s",asDDSDesc[derivedId].pszDatasetName,GetDescription()));
papoDerivedMetadataList.SetNameValue(CPLSPrintf("DERIVED_SUBDATASET_%i_NAME",derivedId),CPLSPrintf("DERIVED_SUBDATASET:%s:%s",asDDSDesc[derivedId].pszDatasetName,GetDescription()));

CPLString osDesc(CPLSPrintf("%s from %s",asDDSDesc[derivedId].pszDatasetDescritpion,GetDescription()));
papoDerivedMetadataList.SetNameValue(CPLSPrintf("DERIVED_SUBDATASET_%i_DESC",derivedId),osDesc.c_str());
CPLString osDesc(CPLSPrintf("%s from %s",asDDSDesc[derivedId].pszDatasetDescritpion,GetDescription()));
papoDerivedMetadataList.SetNameValue(CPLSPrintf("DERIVED_SUBDATASET_%i_DESC",derivedId),osDesc.c_str());
}
}

return papoDerivedMetadataList.List();
}
return papoDerivedMetadataList.List();
}
else
return GDALMajorObject::GetMetadata(pszDomain);
}
Expand Down

0 comments on commit 07a3c7e

Please sign in to comment.