Skip to content

Commit

Permalink
Initialize various struct/class member variables to avoid cppcheck wa…
Browse files Browse the repository at this point in the history
…rnings
  • Loading branch information
rouault authored and nyalldawson committed Nov 9, 2020
1 parent 4f31931 commit 61f5cdf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/core/layout/qgslayoutitemmapgrid.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1054,10 +1054,10 @@ class CORE_EXPORT QgsLayoutItemMapGrid : public QgsLayoutItemMapItem


struct GridLineAnnotation struct GridLineAnnotation
{ {
BorderSide border; // border on which the annotation is BorderSide border = Left; // border on which the annotation is
QVector2D position; // position on the frame QVector2D position; // position on the frame
QVector2D vector; // vector towards map center QVector2D vector; // vector towards map center
double angle; // the (acute) angle formed between the vector and the border double angle = 0; // the (acute) angle formed between the vector and the border
}; };


/** /**
Expand Down
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmscapabilities.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ struct QgsWmtsTileMatrix
QString identifier; QString identifier;
QString title, abstract; QString title, abstract;
QStringList keywords; QStringList keywords;
double scaleDenom; double scaleDenom = 0;
QgsPointXY topLeft; //!< Top-left corner of the tile matrix in map units QgsPointXY topLeft; //!< Top-left corner of the tile matrix in map units
int tileWidth; //!< Width of a tile in pixels int tileWidth; //!< Width of a tile in pixels
int tileHeight; //!< Height of a tile in pixels int tileHeight; //!< Height of a tile in pixels
Expand Down Expand Up @@ -643,7 +643,7 @@ struct QgsWmtsStyle
QString identifier; QString identifier;
QString title, abstract; QString title, abstract;
QStringList keywords; QStringList keywords;
bool isDefault; bool isDefault = false;
QList<QgsWmtsLegendURL> legendURLs; QList<QgsWmtsLegendURL> legendURLs;
}; };


Expand Down
6 changes: 3 additions & 3 deletions src/server/services/wfs/qgswfstransaction.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace QgsWfs


QStringList insertFeatureIds; QStringList insertFeatureIds;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand All @@ -56,7 +56,7 @@ namespace QgsWfs


int totalUpdated = 0; int totalUpdated = 0;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand All @@ -73,7 +73,7 @@ namespace QgsWfs


int totalDeleted = 0; int totalDeleted = 0;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand Down
6 changes: 3 additions & 3 deletions src/server/services/wfs/qgswfstransaction_1_0_0.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace QgsWfs


QStringList insertFeatureIds; QStringList insertFeatureIds;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand All @@ -56,7 +56,7 @@ namespace QgsWfs


QStringList serverFids; QStringList serverFids;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand All @@ -71,7 +71,7 @@ namespace QgsWfs


QStringList serverFids; QStringList serverFids;


bool error; bool error = false;


QString errorMsg; QString errorMsg;
}; };
Expand Down

0 comments on commit 61f5cdf

Please sign in to comment.