From: jmt Date: Tue, 6 Oct 2009 20:59:45 +0000 (+0000) Subject: Use boost string algorithms to avoid dependence on C-library extensions missing in... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4b5518808bddad5ce126831f037cfa1b374405c8;p=flightgear.git Use boost string algorithms to avoid dependence on C-library extensions missing in MSVC. Also they're just nicer. --- diff --git a/src/Navaids/positioned.cxx b/src/Navaids/positioned.cxx index 534ffa223..2651199ce 100644 --- a/src/Navaids/positioned.cxx +++ b/src/Navaids/positioned.cxx @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -758,7 +759,7 @@ public: return false; } - return (::strncmp(aPos->ident().c_str(), _ident.c_str(), _ident.size()) == 0); + return (boost::algorithm::starts_with(aPos->ident(), _ident)); } virtual FGPositioned::Type minType() const @@ -817,7 +818,7 @@ public: return false; } - return (::strncasecmp(aPos->name().c_str(), _name.c_str(), _name.size()) == 0); + return (boost::algorithm::istarts_with(aPos->name(), _name)); } virtual FGPositioned::Type minType() const