X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2Fpositioned.cxx;h=7aa183eba02be4a831f782f39b433c4871b210fc;hb=4928886e562c04bf8a8497a6b4f70aba793e20c2;hp=045839da3398229236db5bd3b3f83147730aabbd;hpb=f9a5f921a4853f7e64d467d63e19acf8f6f84979;p=flightgear.git diff --git a/src/Navaids/positioned.cxx b/src/Navaids/positioned.cxx index 045839da3..7aa183eba 100644 --- a/src/Navaids/positioned.cxx +++ b/src/Navaids/positioned.cxx @@ -28,6 +28,7 @@ #include #include // for sort #include +#include #include #include @@ -840,7 +841,7 @@ FGPositioned::sortByRange(List& aResult, const SGGeod& aPos) FGPositioned::Filter* createSearchFilter(const SGPropertyNode* arg) { - string sty(arg->getStringValue("type", 0)); + string sty(arg->getStringValue("type", "any")); FGPositioned::Type ty = FGPositioned::typeFromName(sty); double minRunwayLenFt = arg->getDoubleValue("min-runway-length-ft", -1.0); @@ -860,7 +861,7 @@ FGPositioned::Filter* createSearchFilter(const SGPropertyNode* arg) return NULL; } -SGGeod commandSearchPos(const SGPropertyNode* arg) +static SGGeod commandSearchPos(const SGPropertyNode* arg) { if (arg->hasChild("longitude-deg") && arg->hasChild("latitude-deg")) { return SGGeod::fromDeg(arg->getDoubleValue("longitude-deg"), @@ -931,7 +932,7 @@ bool commandFindByIdent(const SGPropertyNode* arg) if (arg->hasChild("name")) { results = FGPositioned::findAllWithName(arg->getStringValue("name"), filt.get(), exact); } else if (arg->hasChild("ident")) { - results = FGPositioned::findAllWithName(arg->getStringValue("ident"), filt.get(), exact); + results = FGPositioned::findAllWithIdent(arg->getStringValue("ident"), filt.get(), exact); } else { SG_LOG(SG_GENERAL, SG_WARN, "commandFindByIdent: no search term defined"); return false;