mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-13 00:07:27 -05:00
Merge pull request #8362 from m-kuhn/codeReadability
Improve code readability
This commit is contained in:
commit
2f1dec9824
@ -492,10 +492,13 @@ void QgsVectorFileWriter::init( QString vectorFileName,
|
|||||||
|
|
||||||
mFieldValueConverter = fieldValueConverter;
|
mFieldValueConverter = fieldValueConverter;
|
||||||
|
|
||||||
for ( int fldIdx = 0; ( action == CreateOrOverwriteFile ||
|
switch ( action )
|
||||||
action == CreateOrOverwriteLayer ||
|
{
|
||||||
action == AppendToLayerAddFields ) &&
|
case CreateOrOverwriteFile:
|
||||||
fldIdx < fields.count(); ++fldIdx )
|
case CreateOrOverwriteLayer:
|
||||||
|
case AppendToLayerAddFields:
|
||||||
|
{
|
||||||
|
for ( int fldIdx = 0; fldIdx < fields.count(); ++fldIdx )
|
||||||
{
|
{
|
||||||
QgsField attrField = fields.at( fldIdx );
|
QgsField attrField = fields.at( fldIdx );
|
||||||
|
|
||||||
@ -674,8 +677,10 @@ void QgsVectorFileWriter::init( QString vectorFileName,
|
|||||||
existingIdxs.insert( ogrIdx );
|
existingIdxs.insert( ogrIdx );
|
||||||
mAttrIdxToOgrIdx.insert( fldIdx, ogrIdx );
|
mAttrIdxToOgrIdx.insert( fldIdx, ogrIdx );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
if ( action == AppendToLayerNoNewFields )
|
case AppendToLayerNoNewFields:
|
||||||
{
|
{
|
||||||
for ( int fldIdx = 0; fldIdx < fields.count(); ++fldIdx )
|
for ( int fldIdx = 0; fldIdx < fields.count(); ++fldIdx )
|
||||||
{
|
{
|
||||||
@ -686,6 +691,8 @@ void QgsVectorFileWriter::init( QString vectorFileName,
|
|||||||
mAttrIdxToOgrIdx.insert( fldIdx, ogrIdx );
|
mAttrIdxToOgrIdx.insert( fldIdx, ogrIdx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
QgsDebugMsg( QStringLiteral( "Done creating fields" ) );
|
QgsDebugMsg( QStringLiteral( "Done creating fields" ) );
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user