From: ehofman Date: Mon, 18 Jul 2005 11:55:39 +0000 (+0000) Subject: Perhaps it's better to compare the contents of the strings instead of comparing the... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e4390aac4238ec283b9b7736c0cb90d602a990e8;p=flightgear.git Perhaps it's better to compare the contents of the strings instead of comparing the pointers. --- diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index f39ddd232..8cc39b475 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -193,10 +193,17 @@ protected: virtual void setupFont (SGPropertyNode *); private: + struct ltstr + { + bool operator()(const char* s1, const char* s2) const { + return strcmp(s1, s2) < 0; + } + }; + fntTexFont _tex_font; puFont _font; - map _colors; - typedef map::const_iterator _itt_t; + map _colors; + typedef map::const_iterator _itt_t; // Free all allocated memory. void clear ();