]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/atis.cxx
Win32 fix
[flightgear.git] / src / ATCDCL / atis.cxx
index 357ff18a2b941598602d92d87e8ca608f803b0a0..368c4ae88863e102c8c77d463c54575b31ae11cf 100644 (file)
@@ -42,6 +42,8 @@
 
 #include <boost/tuple/tuple.hpp>
 #include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
+
 
 #include <simgear/misc/sg_path.hxx>
 
@@ -89,7 +91,7 @@ FGATIS::FGATIS() :
   using namespace lex;
 # define NIL ""
 # define REMAP(from,to) _remap[#from] = to;
-# include <atis_remap.hxx>
+# include "atis_remap.hxx"
 # undef REMAP
 # undef NIL
 
@@ -256,7 +258,12 @@ int FGATIS::GenTransmission(const int regen, const int special) {
 // make things nicer for the text-to-speech system:
     for (MSS::const_iterator replace = _remap.begin();
           replace != _remap.end(); replace++) {
-      if (word == replace->first) {
+      // Due to inconsistent capitalisation in the apt.dat file, we need
+      // to do a case-insensitive comparison here.
+      string tmp1 = word, tmp2 = replace->first;
+      boost::algorithm::to_lower(tmp1);
+      boost::algorithm::to_lower(tmp2);
+      if (tmp1 == tmp2) {
         word = replace->second;
         break;
       }