Skip to content
Permalink
Browse files

No initial underscores in variables

  • Loading branch information
elpaso authored and nyalldawson committed May 26, 2020
1 parent 160c6bf commit 3ac41e328796b67eddf0ef37ee4638d4437224a0
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/providers/postgres/raster/qgspostgresrasterprovider.cpp
@@ -307,46 +307,46 @@ bool QgsPostgresRasterProvider::readBlock( int bandNo, const QgsRectangle &viewE
}
case Qgis::DataType::Int16:
{
const int _int { val.toInt( &ok ) };
const int intVal { val.toInt( &ok ) };
if ( ! ok )
{
QgsMessageLog::logMessage( tr( "Cannot convert identified value to int" ), QStringLiteral( "PostGIS" ), Qgis::Warning );
return false;
}
std::memcpy( data, &_int, sizeof( int ) );
std::memcpy( data, &intVal, sizeof( int ) );
break;
}
case Qgis::DataType::Int32:
{
const long _long { val.toLong( &ok ) };
const long longVal { val.toLong( &ok ) };
if ( ! ok )
{
QgsMessageLog::logMessage( tr( "Cannot convert identified value to long" ), QStringLiteral( "PostGIS" ), Qgis::Warning );
return false;
}
std::memcpy( data, &_long, sizeof( long ) );
std::memcpy( data, &longVal, sizeof( long ) );
break;
}
case Qgis::DataType::Float32:
{
const float _float { val.toFloat( &ok ) };
const float floatVal { val.toFloat( &ok ) };
if ( ! ok )
{
QgsMessageLog::logMessage( tr( "Cannot convert identified value to float" ), QStringLiteral( "PostGIS" ), Qgis::Warning );
return false;
}
std::memcpy( data, &_float, sizeof( float ) );
std::memcpy( data, &floatVal, sizeof( float ) );
break;
}
case Qgis::DataType::Float64:
{
const double _double { val.toDouble( &ok ) };
const double doubleVal { val.toDouble( &ok ) };
if ( ! ok )
{
QgsMessageLog::logMessage( tr( "Cannot convert identified value to double" ), QStringLiteral( "PostGIS" ), Qgis::Warning );
return false;
}
std::memcpy( data, &_double, sizeof( double ) );
std::memcpy( data, &doubleVal, sizeof( double ) );
break;
}
default:

0 comments on commit 3ac41e3

Please sign in to comment.
You can’t perform that action at this time.