mail[Wesnoth-commits] r29020 - in /trunk/src: language.cpp language.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on August 27, 2008 - 11:30:
Author: suokko
Date: Wed Aug 27 11:13:11 2008
New Revision: 29020

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29020&view=rev
Log:
Added typedef for list of languages

Modified:
    trunk/src/language.cpp
    trunk/src/language.hpp

Modified: trunk/src/language.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=29020&r1=29019&r2=29020&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Wed Aug 27 11:13:11 2008
@@ -89,7 +89,7 @@
        string_map strings_;
 }
 
-static std::vector<language_def> known_languages;
+static language_list known_languages;
 
 std::string languagedef_name (const language_def& def)
 {
@@ -177,7 +177,7 @@
        return true;
 }
 
-std::vector<language_def> get_languages()
+language_list get_languages()
 {
        // We sort every time, the local might have changed which can modify 
the
        // sort order.
@@ -332,7 +332,7 @@
        // end of string_table fill
 
        // Reset translations for the name of current languages
-       for (std::vector<language_def>::iterator itor = 
known_languages.begin();
+       for (language_list::iterator itor = known_languages.begin();
                        itor != known_languages.end(); ++itor) {
 
                itor->language.reset_translation();
@@ -352,7 +352,7 @@
        const std::string& prefs_locale = preferences::language();
        if(prefs_locale.empty() == false) {
                wesnoth_setlocale(LC_MESSAGES, prefs_locale, NULL);
-               for(std::vector<language_def>::const_iterator i = 
known_languages.begin();
+               for(language_list::const_iterator i = known_languages.begin();
                                i != known_languages.end(); ++i) {
                        if (prefs_locale == i->localename)
                                return *i;

Modified: trunk/src/language.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.hpp?rev=29020&r1=29019&r2=29020&view=diff
==============================================================================
--- trunk/src/language.hpp (original)
+++ trunk/src/language.hpp Wed Aug 27 11:13:11 2008
@@ -64,6 +64,8 @@
        bool available() const;
 };
 
+typedef std::vector<language_def> language_list;
+
 std::string languagedef_name (const language_def& def);
 
 struct symbol_table




Related Messages


Powered by MHonArc, Updated Wed Aug 27 12:00:52 2008