mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Avoid some mixing enum types warnings
This commit is contained in:
parent
7c4de560a6
commit
d4f509f7a2
@ -67,7 +67,7 @@ bool QgsImageWarper::openSrcDSAndGetWarpOpt( const QString &input, const Resampl
|
||||
}
|
||||
psWarpOptions->pfnProgress = GDALTermProgress;
|
||||
psWarpOptions->pfnTransformer = pfnTransform;
|
||||
psWarpOptions->eResampleAlg = GDALResampleAlg( resampling );
|
||||
psWarpOptions->eResampleAlg = toGDALResampleAlg( resampling );
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -360,3 +360,25 @@ int CPL_STDCALL QgsImageWarper::updateWarpProgress( double dfComplete, const cha
|
||||
mWarpCanceled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
GDALResampleAlg QgsImageWarper::toGDALResampleAlg( const QgsImageWarper::ResamplingMethod method ) const
|
||||
{
|
||||
switch ( method )
|
||||
{
|
||||
case NearestNeighbour:
|
||||
return GRA_NearestNeighbour;
|
||||
case Bilinear:
|
||||
return GRA_Bilinear;
|
||||
case Cubic:
|
||||
return GRA_Cubic;
|
||||
case CubicSpline:
|
||||
return GRA_CubicSpline;
|
||||
case Lanczos:
|
||||
return GRA_Lanczos;
|
||||
default:
|
||||
return GRA_NearestNeighbour;
|
||||
};
|
||||
|
||||
//avoid warning
|
||||
return GRA_NearestNeighbour;
|
||||
}
|
||||
|
@ -95,6 +95,8 @@ class QgsImageWarper
|
||||
static int CPL_STDCALL updateWarpProgress( double dfComplete, const char *pszMessage, void *pProgressArg );
|
||||
|
||||
static bool mWarpCanceled;
|
||||
|
||||
GDALResampleAlg toGDALResampleAlg( const ResamplingMethod method ) const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -315,7 +315,7 @@ QString QgsBench::serialize( QMap<QString, QVariant> theMap, int level )
|
||||
QMap<QString, QVariant>::const_iterator i = theMap.constBegin();
|
||||
while ( i != theMap.constEnd() )
|
||||
{
|
||||
switch ( i.value().type() )
|
||||
switch ( (QMetaType::Type)i.value().type() )
|
||||
{
|
||||
case QMetaType::Int:
|
||||
list.append( space2 + "\"" + i.key() + "\": " + QString( "%1" ).arg( i.value().toInt() ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user