Skip to content

Commit c28c493

Browse files
committed
fix all occurrences of multiple statements in a single line
This was accomplished by running scripts/astyle-all.sh.
1 parent 95fa866 commit c28c493

File tree

101 files changed

+1582
-659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1582
-659
lines changed

src/analysis/interpolation/DualEdgeTriangulation.cc

+6-3
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,8 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
15271527

15281528
//set the necessary nexts of leftPolygon(exept the first)
15291529
int actedgel = leftPolygon[1];
1530-
leftiter = leftPolygon.constBegin(); leftiter += 2;
1530+
leftiter = leftPolygon.constBegin();
1531+
leftiter += 2;
15311532
for ( ; leftiter != leftPolygon.constEnd(); ++leftiter )
15321533
{
15331534
mHalfEdge[actedgel]->setNext(( *leftiter ) );
@@ -1536,7 +1537,8 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline )
15361537

15371538
//set all the necessary nexts of rightPolygon
15381539
int actedger = rightPolygon[1];
1539-
rightiter = rightPolygon.constBegin(); rightiter += 2;
1540+
rightiter = rightPolygon.constBegin();
1541+
rightiter += 2;
15401542
for ( ; rightiter != rightPolygon.constEnd(); ++rightiter )
15411543
{
15421544
mHalfEdge[actedger]->setNext(( *rightiter ) );
@@ -2526,7 +2528,8 @@ void DualEdgeTriangulation::triangulatePolygon( QList<int>* poly, QList<int>* fr
25262528
mHalfEdge[( *( --poly->end() ) )]->setNext( inserta );
25272529

25282530
QList<int> polya;
2529-
iterator = poly->constBegin(); iterator += 2;
2531+
iterator = poly->constBegin();
2532+
iterator += 2;
25302533
while ( iterator != poly->constEnd() )
25312534
{
25322535
polya.append(( *iterator ) );

src/analysis/raster/qgsrastermatrix.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ void QgsRasterMatrix::setData( int cols, int rows, double* data, double nodataVa
7272
double* QgsRasterMatrix::takeData()
7373
{
7474
double* data = mData;
75-
mData = nullptr; mColumns = 0; mRows = 0;
75+
mData = nullptr;
76+
mColumns = 0;
77+
mRows = 0;
7678
return data;
7779
}
7880

@@ -337,7 +339,8 @@ bool QgsRasterMatrix::twoArgumentOperation( TwoArgOperator op, const QgsRasterMa
337339

338340
for ( int i = 0; i < nEntries; ++i )
339341
{
340-
value1 = mData[i]; value2 = matrix[i];
342+
value1 = mData[i];
343+
value2 = matrix[i];
341344
if ( value1 == mNodataValue || value2 == other.mNodataValue )
342345
{
343346
mData[i] = mNodataValue;
@@ -357,7 +360,9 @@ bool QgsRasterMatrix::twoArgumentOperation( TwoArgOperator op, const QgsRasterMa
357360
int nEntries = other.nColumns() * other.nRows();
358361
double value = mData[0];
359362
delete[] mData;
360-
mData = new double[nEntries]; mColumns = other.nColumns(); mRows = other.nRows();
363+
mData = new double[nEntries];
364+
mColumns = other.nColumns();
365+
mRows = other.nRows();
361366
mNodataValue = other.nodataValue();
362367

363368
if ( value == mNodataValue )

src/analysis/raster/qgsrelief.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ bool QgsRelief::processNineCellWindow( float* x1, float* x2, float* x3, float* x
330330
}
331331
else
332332
{
333-
r2 = hillShadeValue315; g2 = hillShadeValue315; b2 = hillShadeValue315;
333+
r2 = hillShadeValue315;
334+
g2 = hillShadeValue315;
335+
b2 = hillShadeValue315;
334336
}
335337

336338
//combine with r,g,b with 70 percentage coverage

src/analysis/vector/qgsgeometryanalyzer.cpp

+26-12
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,9 @@ const unsigned char* QgsGeometryAnalyzer::locateBetweenWkbString( const unsigned
13031303
}
13041304
}
13051305
}
1306-
prevx = *x; prevy = *y; prevz = *z;
1306+
prevx = *x;
1307+
prevy = *y;
1308+
prevz = *z;
13071309
}
13081310
return ptr;
13091311
}
@@ -1339,7 +1341,9 @@ const unsigned char* QgsGeometryAnalyzer::locateAlongWkbString( const unsigned c
13391341
result.append( pt2 );
13401342
}
13411343
}
1342-
prevx = *x; prevy = *y; prevz = *z;
1344+
prevx = *x;
1345+
prevy = *y;
1346+
prevz = *z;
13431347
}
13441348
return ptr;
13451349
}
@@ -1385,13 +1389,17 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
13851389
{
13861390
if ( reversed )
13871391
{
1388-
pt1.setX( x2 ); pt1.setY( y2 );
1389-
pt2.setX( x1 ); pt2.setY( y1 );
1392+
pt1.setX( x2 );
1393+
pt1.setY( y2 );
1394+
pt2.setX( x1 );
1395+
pt2.setY( y1 );
13901396
}
13911397
else
13921398
{
1393-
pt1.setX( x1 ); pt1.setY( y1 );
1394-
pt2.setX( x2 ); pt2.setY( y2 );
1399+
pt1.setX( x1 );
1400+
pt1.setY( y1 );
1401+
pt2.setX( x2 );
1402+
pt2.setY( y2 );
13951403
}
13961404
secondPointClipped = false;
13971405
return true;
@@ -1400,7 +1408,8 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
14001408
//m1 inside and m2 not
14011409
if ( m1 >= range1 && m1 <= range2 )
14021410
{
1403-
pt1.setX( x1 ); pt1.setY( y1 );
1411+
pt1.setX( x1 );
1412+
pt1.setY( y1 );
14041413
double dist = ( range2 - m1 ) / ( m2 - m1 );
14051414
pt2.setX( x1 + ( x2 - x1 ) * dist );
14061415
pt2.setY( y1 + ( y2 - y1 ) * dist );
@@ -1410,7 +1419,8 @@ bool QgsGeometryAnalyzer::clipSegmentByRange( double x1, double y1, double m1, d
14101419
//m2 inside and m1 not
14111420
if ( m2 >= range1 && m2 <= range2 )
14121421
{
1413-
pt2.setX( x2 ); pt2.setY( y2 );
1422+
pt2.setX( x2 );
1423+
pt2.setY( y2 );
14141424
double dist = ( m2 - range1 ) / ( m2 - m1 );
14151425
pt1.setX( x2 - ( x2 - x1 ) * dist );
14161426
pt1.setY( y2 - ( y2 - y1 ) * dist );
@@ -1468,12 +1478,14 @@ void QgsGeometryAnalyzer::locateAlongSegment( double x1, double y1, double m1, d
14681478
if ( reversed )
14691479
{
14701480
pt2Ok = true;
1471-
pt2.setX( x2 ); pt2.setY( y2 );
1481+
pt2.setX( x2 );
1482+
pt2.setY( y2 );
14721483
}
14731484
else
14741485
{
14751486
pt1Ok = true;
1476-
pt1.setX( x1 ); pt1.setY( y1 );
1487+
pt1.setX( x1 );
1488+
pt1.setY( y1 );
14771489
}
14781490
}
14791491

@@ -1483,12 +1495,14 @@ void QgsGeometryAnalyzer::locateAlongSegment( double x1, double y1, double m1, d
14831495
if ( reversed )
14841496
{
14851497
pt1Ok = true;
1486-
pt1.setX( x1 ); pt1.setY( y1 );
1498+
pt1.setX( x1 );
1499+
pt1.setY( y1 );
14871500
}
14881501
else
14891502
{
14901503
pt2Ok = true;
1491-
pt2.setX( x2 ); pt2.setY( y2 );
1504+
pt2.setX( x2 );
1505+
pt2.setY( y2 );
14921506
}
14931507
}
14941508

src/analysis/vector/qgstransectsample.cpp

+20-8
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,16 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
235235
QgsGeometry* lineClipStratum = lineFarAwayGeom->intersection( strataGeom );
236236
if ( !lineClipStratum )
237237
{
238-
delete lineFarAwayGeom; delete lineClipStratum;
238+
delete lineFarAwayGeom;
239+
delete lineClipStratum;
239240
continue;
240241
}
241242

242243
//cancel if distance between sample point and line is too large (line does not start at point
243244
if ( lineClipStratum->distance( *samplePoint ) > 0.000001 )
244245
{
245-
delete lineFarAwayGeom; delete lineClipStratum;
246+
delete lineFarAwayGeom;
247+
delete lineClipStratum;
246248
continue;
247249
}
248250

@@ -262,14 +264,16 @@ int QgsTransectSample::createSample( QProgressDialog* pd )
262264
double transectLength = distanceArea.measureLength( lineClipStratum );
263265
if ( transectLength < mMinTransectLength )
264266
{
265-
delete lineFarAwayGeom; delete lineClipStratum;
267+
delete lineFarAwayGeom;
268+
delete lineClipStratum;
266269
continue;
267270
}
268271

269272
//search closest existing profile. Cancel if dist < minDist
270273
if ( otherTransectWithinDistance( lineClipStratum, minDistanceLayerUnits, minDistance, sIndex, lineFeatureMap, distanceArea ) )
271274
{
272-
delete lineFarAwayGeom; delete lineClipStratum;
275+
delete lineFarAwayGeom;
276+
delete lineClipStratum;
273277
continue;
274278
}
275279

@@ -441,22 +445,30 @@ bool QgsTransectSample::closestSegmentPoints( QgsGeometry& g1, QgsGeometry& g2,
441445

442446
if ( d1 <= d2 && d1 <= d3 && d1 <= d4 )
443447
{
444-
dist = sqrt( d1 ); pt1 = p11; pt2 = minDistPoint1;
448+
dist = sqrt( d1 );
449+
pt1 = p11;
450+
pt2 = minDistPoint1;
445451
return true;
446452
}
447453
else if ( d2 <= d1 && d2 <= d3 && d2 <= d4 )
448454
{
449-
dist = sqrt( d2 ); pt1 = p12; pt2 = minDistPoint2;
455+
dist = sqrt( d2 );
456+
pt1 = p12;
457+
pt2 = minDistPoint2;
450458
return true;
451459
}
452460
else if ( d3 <= d1 && d3 <= d2 && d3 <= d4 )
453461
{
454-
dist = sqrt( d3 ); pt1 = p21; pt2 = minDistPoint3;
462+
dist = sqrt( d3 );
463+
pt1 = p21;
464+
pt2 = minDistPoint3;
455465
return true;
456466
}
457467
else
458468
{
459-
dist = sqrt( d4 ); pt1 = p21; pt2 = minDistPoint4;
469+
dist = sqrt( d4 );
470+
pt1 = p21;
471+
pt2 = minDistPoint4;
460472
return true;
461473
}
462474
}

src/analysis/vector/qgszonalstatistics.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ int QgsZonalStatistics::cellInfoForBBox( const QgsRectangle& rasterBBox, const Q
392392
QgsRectangle intersectBox = rasterBBox.intersect( &featureBBox );
393393
if ( intersectBox.isEmpty() )
394394
{
395-
nCellsX = 0; nCellsY = 0; offsetX = 0; offsetY = 0;
395+
nCellsX = 0;
396+
nCellsY = 0;
397+
offsetX = 0;
398+
offsetY = 0;
396399
return 0;
397400
}
398401

src/app/composer/qgscomposerpicturewidget.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@ int QgsComposerPictureWidget::addDirectoryToPreview( const QString& path )
475475
//exclude files that are not svg or image
476476
if ( !fileIsSvg && !fileIsPixel )
477477
{
478-
++counter; continue;
478+
++counter;
479+
continue;
479480
}
480481

481482
QListWidgetItem * listItem = new QListWidgetItem( mPreviewListWidget );
@@ -491,7 +492,8 @@ int QgsComposerPictureWidget::addDirectoryToPreview( const QString& path )
491492
QPixmap iconPixmap( filePath );
492493
if ( iconPixmap.isNull() )
493494
{
494-
++counter; continue; //unknown file format or other problem
495+
++counter;
496+
continue; //unknown file format or other problem
495497
}
496498
//set pixmap hardcoded to 30/30, same as icon size for mPreviewListWidget
497499
QPixmap scaledPixmap( iconPixmap.scaled( QSize( 30, 30 ), Qt::KeepAspectRatio ) );

src/app/qgisapp.cpp

+48-16
Original file line numberDiff line numberDiff line change
@@ -1831,11 +1831,21 @@ void QgisApp::createToolBars()
18311831
QAction* defSelectAction = mActionSelectFeatures;
18321832
switch ( settings.value( "/UI/selectTool", 0 ).toInt() )
18331833
{
1834-
case 0: defSelectAction = mActionSelectFeatures; break;
1835-
case 1: defSelectAction = mActionSelectFeatures; break;
1836-
case 2: defSelectAction = mActionSelectRadius; break;
1837-
case 3: defSelectAction = mActionSelectPolygon; break;
1838-
case 4: defSelectAction = mActionSelectFreehand; break;
1834+
case 0:
1835+
defSelectAction = mActionSelectFeatures;
1836+
break;
1837+
case 1:
1838+
defSelectAction = mActionSelectFeatures;
1839+
break;
1840+
case 2:
1841+
defSelectAction = mActionSelectRadius;
1842+
break;
1843+
case 3:
1844+
defSelectAction = mActionSelectPolygon;
1845+
break;
1846+
case 4:
1847+
defSelectAction = mActionSelectFreehand;
1848+
break;
18391849
}
18401850
bt->setDefaultAction( defSelectAction );
18411851
QAction* selectAction = mAttributesToolBar->insertWidget( mActionDeselectAll, bt );
@@ -1865,9 +1875,15 @@ void QgisApp::createToolBars()
18651875
QAction* defMeasureAction = mActionMeasure;
18661876
switch ( settings.value( "/UI/measureTool", 0 ).toInt() )
18671877
{
1868-
case 0: defMeasureAction = mActionMeasure; break;
1869-
case 1: defMeasureAction = mActionMeasureArea; break;
1870-
case 2: defMeasureAction = mActionMeasureAngle; break;
1878+
case 0:
1879+
defMeasureAction = mActionMeasure;
1880+
break;
1881+
case 1:
1882+
defMeasureAction = mActionMeasureArea;
1883+
break;
1884+
case 2:
1885+
defMeasureAction = mActionMeasureAngle;
1886+
break;
18711887
}
18721888
bt->setDefaultAction( defMeasureAction );
18731889
QAction* measureAction = mAttributesToolBar->insertWidget( mActionMapTips, bt );
@@ -1887,11 +1903,21 @@ void QgisApp::createToolBars()
18871903
QAction* defAnnotationAction = mActionTextAnnotation;
18881904
switch ( settings.value( "/UI/annotationTool", 0 ).toInt() )
18891905
{
1890-
case 0: defAnnotationAction = mActionTextAnnotation; break;
1891-
case 1: defAnnotationAction = mActionFormAnnotation; break;
1892-
case 2: defAnnotationAction = mActionHtmlAnnotation; break;
1893-
case 3: defAnnotationAction = mActionSvgAnnotation; break;
1894-
case 4: defAnnotationAction = mActionAnnotation; break;
1906+
case 0:
1907+
defAnnotationAction = mActionTextAnnotation;
1908+
break;
1909+
case 1:
1910+
defAnnotationAction = mActionFormAnnotation;
1911+
break;
1912+
case 2:
1913+
defAnnotationAction = mActionHtmlAnnotation;
1914+
break;
1915+
case 3:
1916+
defAnnotationAction = mActionSvgAnnotation;
1917+
break;
1918+
case 4:
1919+
defAnnotationAction = mActionAnnotation;
1920+
break;
18951921

18961922
}
18971923
bt->setDefaultAction( defAnnotationAction );
@@ -1914,9 +1940,15 @@ void QgisApp::createToolBars()
19141940
QAction* defNewLayerAction = mActionNewVectorLayer;
19151941
switch ( settings.value( "/UI/defaultNewLayer", 1 ).toInt() )
19161942
{
1917-
case 0: defNewLayerAction = mActionNewSpatiaLiteLayer; break;
1918-
case 1: defNewLayerAction = mActionNewVectorLayer; break;
1919-
case 2: defNewLayerAction = mActionNewMemoryLayer; break;
1943+
case 0:
1944+
defNewLayerAction = mActionNewSpatiaLiteLayer;
1945+
break;
1946+
case 1:
1947+
defNewLayerAction = mActionNewVectorLayer;
1948+
break;
1949+
case 2:
1950+
defNewLayerAction = mActionNewMemoryLayer;
1951+
break;
19201952
}
19211953
bt->setDefaultAction( defNewLayerAction );
19221954
QAction* newLayerAction = mLayerToolBar->addWidget( bt );

src/app/qgsconfigureshortcutsdialog.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ void QgsConfigureShortcutsDialog::populateActions()
8181
QString actionText = actions[i]->text();
8282
actionText.remove( '&' ); // remove the accelerator
8383

84-
QStringList lst; lst << actionText << actions[i]->shortcut().toString();
84+
QStringList lst;
85+
lst << actionText << actions[i]->shortcut().toString();
8586
QTreeWidgetItem* item = new QTreeWidgetItem( lst );
8687
item->setIcon( 0, actions[i]->icon() );
8788
item->setData( 0, Qt::UserRole, qVariantFromValue(( QObject* )actions[i] ) );

src/app/qgsidentifyresultsdialog.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@ void QgsIdentifyResultsDialog::addFeature( QgsRasterLayer *layer,
795795

796796
tblResults->resizeRowToContents( j );
797797

798-
j++; i++;
798+
j++;
799+
i++;
799800
}
800801
//tblResults->resizeColumnToContents( 1 );
801802

0 commit comments

Comments
 (0)