Skip to content

Commit d00aa8f

Browse files
author
jef
committed
fix pedantic warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@12145 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8421c00 commit d00aa8f

File tree

9 files changed

+15
-17
lines changed

9 files changed

+15
-17
lines changed

src/core/pal/feature.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,14 @@ namespace pal
8888
void setDistLabel( double dist ) { distlabel = dist; }
8989

9090
protected:
91+
Layer *layer;
92+
PalGeometry *userGeom;
9193
double label_x;
9294
double label_y;
95+
double distlabel;
9396
LabelInfo* labelInfo; // optional
9497

9598
char *uid;
96-
Layer *layer;
97-
98-
double distlabel;
99-
100-
PalGeometry *userGeom;
10199

102100
// array of parts - possibly not necessary
103101
//int nPart;

src/core/pal/layer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,12 @@ namespace pal
9898
double min_scale;
9999
double max_scale;
100100

101-
Arrangement arrangement;
102-
103-
LabelMode mode;
104101
bool mergeLines;
105102

106103
/** optional flags used for some placement methods */
107104
unsigned long arrangementFlags;
105+
LabelMode mode;
106+
Arrangement arrangement;
108107

109108
// indexes (spatial and id)
110109
RTree<FeaturePart*, double, 2, double, 8, 4> *rtree;

src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath,
106106
mLabel( 0 ),
107107
mLabelOn( false ),
108108
mVertexMarkerOnlyForSelection( false ),
109-
mFetching( false ),
110109
mActiveCommand( NULL ),
110+
mFetching( false ),
111111
mRendererV2( NULL ),
112112
mUsingRendererV2( false ),
113113
mLabelingEngine( NULL )

src/core/qgsvectorlayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
732732
/** Geometry type as defined in enum WkbType (qgis.h) */
733733
int mWkbType;
734734

735+
QgsUndoCommand * mActiveCommand;
736+
735737
/** Renderer object which holds the information about how to display the features */
736738
QgsRenderer *mRenderer;
737739

@@ -778,8 +780,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
778780
QSet<int> mFetchConsidered;
779781
QgsGeometryMap::iterator mFetchChangedGeomIt;
780782
QgsFeatureList::iterator mFetchAddedFeaturesIt;
781-
782-
QgsUndoCommand * mActiveCommand;
783783
};
784784

785785
#endif

src/core/symbology-ng/qgscategorizedsymbolrendererv2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class CORE_EXPORT QgsCategorizedSymbolRendererV2 : public QgsFeatureRendererV2
8989
void setSourceColorRamp( QgsVectorColorRampV2* ramp );
9090

9191
protected:
92-
QgsCategoryList mCategories;
9392
QString mAttrName;
93+
QgsCategoryList mCategories;
9494
QgsSymbolV2* mSourceSymbol;
9595
QgsVectorColorRampV2* mSourceColorRamp;
9696

src/core/symbology-ng/qgsgraduatedsymbolrendererv2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class CORE_EXPORT QgsGraduatedSymbolRendererV2 : public QgsFeatureRendererV2
9797
void setSourceColorRamp( QgsVectorColorRampV2* ramp );
9898

9999
protected:
100-
QgsRangeList mRanges;
101100
QString mAttrName;
101+
QgsRangeList mRanges;
102102
Mode mMode;
103103
QgsSymbolV2* mSourceSymbol;
104104
QgsVectorColorRampV2* mSourceColorRamp;

src/core/symbology-ng/qgslinesymbollayerv2.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ QgsSymbolLayerV2* QgsSimpleLineSymbolLayerV2::clone() const
101101
class MyLine
102102
{
103103
public:
104-
MyLine( QPointF p1, QPointF p2 )
104+
MyLine( QPointF p1, QPointF p2 ) : mVertical(false), mIncreasing(false), mT(0.0), mLength(0.0)
105105
{
106-
if ( p1 == p2 ) return; // invalid
106+
if ( p1 == p2 )
107+
return; // invalid
107108

108109
// tangent and direction
109110
if ( p1.x() == p2.x() )

src/core/symbology-ng/qgssymbollayerv2utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ QPolygonF offsetLine( QPolygonF polyline, double dist )
269269
if ( polyline.count() < 2 )
270270
return newLine;
271271

272-
double angle, t_new, t_old = 0;
272+
double angle = 0.0, t_new, t_old = 0;
273273
QPointF pt_old, pt_new;
274274
QPointF p1 = polyline[0], p2;
275275

src/plugins/labeling/labelinggui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ LabelingGui::LabelingGui( PalLabeling* lbl, QgsVectorLayer* layer, QWidget* pare
148148
radLineParallel, radLineCurved, radLineHorizontal, // line
149149
radAroundCentroid, radPolygonHorizontal, radPolygonFree, radPolygonPerimeter // polygon
150150
};
151-
for ( int i = 0; i < sizeof( placementRadios ) / sizeof( QRadioButton* ); i++ )
151+
for ( unsigned int i = 0; i < sizeof( placementRadios ) / sizeof( QRadioButton* ); i++ )
152152
connect( placementRadios[i], SIGNAL( toggled( bool ) ), this, SLOT( updateOptions() ) );
153153
}
154154

0 commit comments

Comments
 (0)