Skip to content

Commit

Permalink
Fix indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest authored and nyalldawson committed Jun 15, 2019
1 parent 7b69172 commit 941e3ff
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 218 deletions.
38 changes: 19 additions & 19 deletions src/providers/mssql/qgsmssqlfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ QgsMssqlFeatureIterator::~QgsMssqlFeatureIterator()

double QgsMssqlFeatureIterator::ValidLat( const double latitude )
{
if (latitude < -90.0)
if ( latitude < -90.0 )
return -90.0;
if (latitude > 90.0)
if ( latitude > 90.0 )
return 90.0;
return latitude;
}

double QgsMssqlFeatureIterator::ValidLon( const double longitude )
{
if (longitude < -15069.0)
return -15069.0;
if (longitude > 15069.0)
return 15069.0;
return longitude;
if ( longitude < -15069.0 )
return -15069.0;
if ( longitude > 15069.0 )
return 15069.0;
return longitude;
}

void QgsMssqlFeatureIterator::BuildStatement( const QgsFeatureRequest &request )
Expand Down Expand Up @@ -154,21 +154,21 @@ void QgsMssqlFeatureIterator::BuildStatement( const QgsFeatureRequest &request )
foo.setRealNumberPrecision( 8 );
foo.setRealNumberNotation( QTextStream::FixedNotation );

if (mSource->mGeometryColType == QLatin1String("geometry"))
if ( mSource->mGeometryColType == QLatin1String( "geometry" ) )
{
foo << qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMaximum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMaximum() ) << ' ' << qgsDoubleToString( mFilterRect.yMaximum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMaximum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() );
foo << qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMaximum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMaximum() ) << ' ' << qgsDoubleToString( mFilterRect.yMaximum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMaximum() ) << ", "
<< qgsDoubleToString( mFilterRect.xMinimum() ) << ' ' << qgsDoubleToString( mFilterRect.yMinimum() );
}
else
{
foo << qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMaximum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMaximum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMaximum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMaximum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) );
foo << qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMaximum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMaximum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMaximum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMaximum() ) ) << ", "
<< qgsDoubleToString( ValidLon( mFilterRect.xMinimum() ) ) << ' ' << qgsDoubleToString( ValidLat( mFilterRect.yMinimum() ) );
}

mStatement += QStringLiteral( " WHERE " );
Expand Down Expand Up @@ -406,7 +406,7 @@ bool QgsMssqlFeatureIterator::fetchFeature( QgsFeature &feature )
QByteArray ar = mQuery->record().value( mSource->mGeometryColName ).toByteArray();
if ( !ar.isEmpty() )
{
std::unique_ptr<QgsAbstractGeometry> geom = mParser.ParseSqlGeometry(reinterpret_cast< unsigned char * >(ar.data()), ar.size());
std::unique_ptr<QgsAbstractGeometry> geom = mParser.ParseSqlGeometry( reinterpret_cast< unsigned char * >( ar.data() ), ar.size() );
if ( geom != nullptr )
{
feature.setGeometry( QgsGeometry( std::move( geom ) ) );
Expand Down
Loading

0 comments on commit 941e3ff

Please sign in to comment.