Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix equality check
  • Loading branch information
nyalldawson committed May 10, 2021
1 parent 9b42dc0 commit 2c072de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/proj/qgscoordinatereferencesystem.cpp
Expand Up @@ -1640,7 +1640,9 @@ bool QgsCoordinateReferenceSystem::operator==( const QgsCoordinateReferenceSyste
if ( !d->mIsValid || !srs.d->mIsValid )
return false;

if ( d->mCoordinateEpoch != srs.d->mCoordinateEpoch )
if ( std::isnan( d->mCoordinateEpoch ) != std::isnan( srs.d->mCoordinateEpoch ) )
return false;
else if ( !std::isnan( d->mCoordinateEpoch ) && d->mCoordinateEpoch != srs.d->mCoordinateEpoch )
return false;

const bool isUser = d->mSrsId >= USER_CRS_START_ID;
Expand Down

0 comments on commit 2c072de

Please sign in to comment.