From dbc5529bdece41de1aed65c5592bd27b8dceeda1 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Mon, 5 Dec 2011 15:14:23 +0100 Subject: [PATCH] Moving check to member function --- DataStructures/ExtractorStructs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DataStructures/ExtractorStructs.h b/DataStructures/ExtractorStructs.h index 0cbd7d7f4..864b05761 100644 --- a/DataStructures/ExtractorStructs.h +++ b/DataStructures/ExtractorStructs.h @@ -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){