diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx index 7a5871fd7..2ebfb8434 100644 --- a/src/Airports/simple.cxx +++ b/src/Airports/simple.cxx @@ -335,6 +335,16 @@ public: { return mOrdering->compare(aA.first,aB); } + + bool operator()(const std::string& aA, const airport_map::value_type& aB) const + { + return mOrdering->compare(aA, aB.first); + } + + bool operator()(const airport_map::value_type& aA, const airport_map::value_type& aB) const + { + return mOrdering->compare(aA.first, aB.first); + } private: FGIdentOrdering* mOrdering; diff --git a/src/Main/metar_main.cxx b/src/Main/metar_main.cxx index 0857bac5d..d150b6526 100644 --- a/src/Main/metar_main.cxx +++ b/src/Main/metar_main.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -76,7 +77,7 @@ const char *azimuthName(double d) double rnd(double r, int g = 0) { double f = pow(10.0, g); - return f * rint(r / f); + return f * floor(r / f + 0.5); } diff --git a/src/Navaids/fixlist.cxx b/src/Navaids/fixlist.cxx index 2749cf22c..a07429f06 100644 --- a/src/Navaids/fixlist.cxx +++ b/src/Navaids/fixlist.cxx @@ -145,6 +145,16 @@ public: { return mOrdering->compare(aA.first,aB); } + + bool operator()(const std::string& aA, const fix_map_type::value_type& aB) const + { + return mOrdering->compare(aA, aB.first); + } + + bool operator()(const fix_map_type::value_type& aA, const fix_map_type::value_type& aB) const + { + return mOrdering->compare(aA.first, aB.first); + } private: FGIdentOrdering* mOrdering;