Author: soliton
Date: Sun May 24 11:55:36 2009
New Revision: 35869

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35869&view=rev
Log:
removed forlorn case insensitive WML handling

Modified:
    trunk/src/help.cpp

Modified: trunk/src/help.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=35869&r1=35868&r2=35869&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Sun May 24 11:55:36 2009
@@ -569,9 +569,6 @@
 static std::vector<std::string> split_in_width(const std::string &s, const int 
font_size, const unsigned width);
 
 static std::string remove_first_space(const std::string& text);
-
-/// Return a lowercase copy of s.
-static std::string to_lower(const std::string &s);
 
 /// Prepend all chars with meaning inside attributes with a backslash.
 static std::string escape(const std::string &s);
@@ -2576,9 +2573,8 @@
 }
 
 
-help_text_area::ALIGNMENT help_text_area::str_to_align(const std::string &s)
-{
-       const std::string cmp_str = to_lower(s);
+help_text_area::ALIGNMENT help_text_area::str_to_align(const std::string 
&cmp_str)
+{
        if (cmp_str == "left") {
                return LEFT;
        } else if (cmp_str == "middle") {
@@ -2589,7 +2585,7 @@
                return HERE;
        }
        std::stringstream msg;
-       msg << "Invalid alignment string: '" << s << "'";
+       msg << "Invalid alignment string: '" << cmp_str << "'";
        throw parse_error(msg.str());
 }
 
@@ -3020,9 +3016,8 @@
        return ss.str();
 }
 
-SDL_Color string_to_color(const std::string &s)
-{
-       const std::string cmp_str = to_lower(s);
+SDL_Color string_to_color(const std::string &cmp_str)
+{
        if (cmp_str == "green") {
                return font::GOOD_COLOUR;
        }
@@ -3063,14 +3058,6 @@
                return text.substr(1);
        }
        return text;
-}
-
-std::string to_lower(const std::string &s)
-{
-       std::string lower_string;
-       lower_string.resize(s.size());
-       std::transform(s.begin(), s.end(), lower_string.begin(), tolower);
-       return lower_string;
 }
 
 std::string escape(const std::string &s)


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to