Moving check to member function
This commit is contained in:
parent
df82140a39
commit
dbc5529bde
@ -64,6 +64,13 @@ struct _Coordinate {
|
||||
bool isSet() const {
|
||||
return (INT_MIN != lat) && (INT_MIN != lon);
|
||||
}
|
||||
inline bool isValid() const {
|
||||
if(lat > 90*100000 || lat < -90*100000 || lon > 180*100000 || lon <-180*100000) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
inline ostream & operator<<(ostream & out, const _Coordinate & c){
|
||||
|
Loading…
Reference in New Issue
Block a user