From 4b5518808bddad5ce126831f037cfa1b374405c8 Mon Sep 17 00:00:00 2001 From: jmt Date: Tue, 6 Oct 2009 20:59:45 +0000 Subject: [PATCH] Use boost string algorithms to avoid dependence on C-library extensions missing in MSVC. Also they're just nicer. --- src/Navaids/positioned.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5