Skip to content

Commit 34553d3

Browse files
committed
fix warning
1 parent 4eef948 commit 34553d3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/3d/terrain/qgsdemterraintileloader_p.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ static void _heightMapMinMax( const QByteArray &heightMap, float &zMin, float &z
3232
const float *zBits = ( const float * ) heightMap.constData();
3333
int zCount = heightMap.count() / sizeof( float );
3434
bool first = true;
35+
36+
zMin = zMax = std::numeric_limits<float>::quiet_NaN();
3537
for ( int i = 0; i < zCount; ++i )
3638
{
3739
float z = zBits[i];
@@ -45,9 +47,6 @@ static void _heightMapMinMax( const QByteArray &heightMap, float &zMin, float &z
4547
zMin = qMin( zMin, z );
4648
zMax = qMax( zMax, z );
4749
}
48-
49-
if ( first )
50-
zMin = zMax = std::numeric_limits<float>::quiet_NaN();
5150
}
5251

5352

src/core/layout/qgslayoutitem.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ void QgsLayoutItem::applyDataDefinedOrientation( double &width, double &height,
951951
QgsLayoutItemPage::Orientation orientation = QgsLayoutUtils::decodePaperOrientation( orientationString, ok );
952952
if ( ok )
953953
{
954-
double heightD, widthD;
954+
double heightD = 0.0, widthD = 0.0;
955955
switch ( orientation )
956956
{
957957
case QgsLayoutItemPage::Portrait:

src/gui/qgsextentgroupbox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void QgsExtentGroupBox::setOutputExtent( const QgsRectangle &r, const QgsCoordin
140140
}
141141
}
142142

143-
int decimals;
143+
int decimals = 4;
144144
switch ( mOutputCrs.mapUnits() )
145145
{
146146
case QgsUnitTypes::DistanceDegrees:

0 commit comments

Comments
 (0)