GRASS compilation fix

This commit is contained in:
Radim Blazek 2012-12-06 14:17:42 +01:00
parent 4dc84995ee
commit 4d571b1487
3 changed files with 7 additions and 6 deletions

View File

@ -141,7 +141,7 @@ class QgsGrassModule: public QDialog, private Ui::QgsGrassModuleBase
void readStderr();
//! Call on mapset change, i.e. also possible direct/indirect mode change
void mapsetChanged();
//void mapsetChanged();
private:
//! Pointer to the QGIS interface object

View File

@ -93,6 +93,7 @@ SET ( FUNCTIONS
"G_row_to_northing"
"G_set_c_null_value"
"G_set_d_null_value"
"G_set_f_null_value"
"G_set_d_raster_cat"
"G_set_gisrc_mode"
"G_set_null_value"

View File

@ -85,11 +85,10 @@ QgsGrassGisLib::QgsGrassGisLib()
int GRASS_LIB_EXPORT QgsGrassGisLib::errorRoutine( const char *msg, int fatal )
{
Q_UNUSED( fatal );
QgsDebugMsg( QString( "error_routine (fatal = %1): %2" ).arg( fatal ).arg( msg ) );
// Crash to get backtrace
//int *x = 0; *x = 1;
// qFatal does core dump, useful for backtrace
qFatal( QString( "Fatal error: %1" ).arg( msg ).toAscii().data() );
qFatal( "Fatal error: %s", msg );
return 1;
}
@ -116,6 +115,7 @@ void * QgsGrassGisLib::resolve( const char * symbol )
int GRASS_LIB_EXPORT QgsGrassGisLib::G__gisinit( const char * version, const char * programName )
{
Q_UNUSED( version );
// We use this function also to init our fake lib
QgsDebugMsg( QString( "version = %1 programName = %2" ).arg( version ).arg( programName ) );
@ -281,7 +281,7 @@ int G_fatal_error( const char * msg, ... )
va_end( ap );
// qFatal does core dump, useful for backtrace
qFatal( QString( "Fatal error: %1" ).arg( buffer ).toAscii().data() );
qFatal( "Fatal error: %s", buffer );
exit( 1 ); // must exit to avoid compilation warning
}
@ -456,7 +456,7 @@ int QgsGrassGisLib::G_open_raster_new( const char *name, RASTER_MAP_TYPE wr_type
fatal( "Cannot create output data source: " + dataSource );
}
raster.band = 1;
double noDataValue;
double noDataValue = std::numeric_limits<double>::quiet_NaN();
switch ( wr_type )
{
case CELL_TYPE: