]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/fixlist.cxx
Vivian: downgrade log levels from ALERT to INFO, tidy up the code.
[flightgear.git] / src / Navaids / fixlist.cxx
index f22fa57fb709d56e2d27aa39d0329d02d727d596..608faf02e21c6429b262e3d642cffa6a57f0cfe7 100644 (file)
@@ -120,3 +120,18 @@ bool FGFixList::query_and_offset( const string& ident, double lon, double lat,
     *dist = s;
     return true;
 }
+
+const FGFix* FGFixList::findFirstByIdent( const string& ident, bool exact)
+{
+    fix_map_iterator itr;
+    if(exact) {
+        itr = fixlist.find(ident);
+    } else {
+        itr = fixlist.lower_bound(ident);
+    }
+    if(itr == fixlist.end()) {
+        return(NULL);
+    } else {
+        return(&(itr->second));
+    }
+}