]> git.mxchange.org Git - flightgear.git/commitdiff
Use boost string algorithms to avoid dependence on C-library extensions missing in...
authorjmt <jmt>
Tue, 6 Oct 2009 20:59:45 +0000 (20:59 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 7 Oct 2009 06:26:10 +0000 (08:26 +0200)
src/Navaids/positioned.cxx

index 534ffa223bf579a75a64752d4f4f1cb7ae0c1daf..2651199ce0bb77bb7077e18f6b72a5bd0f287b18 100644 (file)
@@ -30,6 +30,7 @@
 #include <iostream>
 
 #include <boost/algorithm/string/case_conv.hpp>
+#include <boost/algorithm/string/predicate.hpp>
 
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/timing/timestamp.hxx>
@@ -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