Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix windows build and some warnings
  • Loading branch information
jef-n committed Sep 13, 2018
1 parent cbb0e76 commit d1ae9b0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/3d/qgs3dutils.cpp
Expand Up @@ -266,6 +266,7 @@ QList<QVector3D> Qgs3DUtils::positions( const Qgs3DMapSettings &map, QgsVectorLa
switch ( altClamp )
{
case AltClampAbsolute:
default:
h = geomZ;
break;
case AltClampTerrain:
Expand Down
4 changes: 2 additions & 2 deletions src/3d/qgsraycastingutils_p.cpp
Expand Up @@ -363,9 +363,9 @@ namespace QgsRayCastingUtils

// the cases below hopefully should not happen and the check is here just as the last resort
// (with sensible camera matrix we should not hit singularities)
if ( qgsFloatNear( nearPos4D.w(), 0, 1e-10 ) )
if ( qgsFloatNear( nearPos4D.w(), 0, 1e-10f ) )
nearPos4D.setW( 1 );
if ( qgsFloatNear( farPos4D.w(), 0, 1e-10 ) )
if ( qgsFloatNear( farPos4D.w(), 0, 1e-10f ) )
farPos4D.setW( 1 );

QVector3D nearPos( ( nearPos4D / nearPos4D.w() ).toVector3D() );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgis.h
Expand Up @@ -394,7 +394,7 @@ namespace qgis
* The map has the enum values (int) as keys and the enum keys (QString) as values.
* The enum must have been declared using Q_ENUM or Q_FLAG.
*/
template<class T> CORE_EXPORT const QMap<T, QString> qgsEnumMap() SIP_SKIP
template<class T> const QMap<T, QString> qgsEnumMap() SIP_SKIP
{
QMetaEnum metaEnum = QMetaEnum::fromType<T>();
Q_ASSERT( metaEnum.isValid() );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsattributes.cpp
Expand Up @@ -33,7 +33,7 @@ QgsAttributeMap QgsAttributes::toMap() const
uint qHash( const QgsAttributes &attributes )
{
if ( attributes.isEmpty() )
return -1;
return ~0;
else
return qHash( attributes.at( 0 ) );
}

0 comments on commit d1ae9b0

Please sign in to comment.