Skip to content

Commit

Permalink
Use all nan values for default-constructed QgsRectangle
Browse files Browse the repository at this point in the history
This was suggested by Benoit in
qgis#54646 (comment)

It may make it easier to spot missing isNull() checks by callers.
  • Loading branch information
strk committed Oct 19, 2023
1 parent 5cde6a9 commit 393fbcf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/geometry/qgsrectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,10 @@ class CORE_EXPORT QgsRectangle

private:

double mXmin = 0.0;
double mYmin = 0.0;
double mXmax = 0.0;
double mYmax = 0.0;
double mXmin = std::numeric_limits< double >::quiet_NaN();
double mYmin = std::numeric_limits< double >::quiet_NaN();
double mXmax = std::numeric_limits< double >::quiet_NaN();
double mYmax = std::numeric_limits< double >::quiet_NaN();

};

Expand Down

0 comments on commit 393fbcf

Please sign in to comment.