Fixed VS2010 warnings (too long names when expanding

templates).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12625 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-04-09 13:45:51 +00:00
parent b48e5cb9b0
commit b29b01107a
2 changed files with 7 additions and 4 deletions

View File

@ -43,10 +43,12 @@ unsigned int plural3_pl(int n) { return static_cast<unsigned int>(n==1 ? 0 : n%1
unsigned int plural3_sl(int n) { return static_cast<unsigned int>(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3); }
unsigned int plural4_ar(int n) { return static_cast<unsigned int>( n==1 ? 0 : n==2 ? 1 : n>=3 && n<=10 ? 2 : 3 ); }
typedef std::map<std::string, class PluralForms> tPluralForms;
PluralForms
PluralForms::from_string(const std::string& str)
{
static std::map<std::string, class PluralForms> plural_forms;
static tPluralForms plural_forms;
if (plural_forms.empty())
{
@ -73,7 +75,7 @@ PluralForms::from_string(const std::string& str)
if (!isspace(str[i]))
space_less_str += str[i];
std::map<std::string, class PluralForms>::const_iterator it= plural_forms.find(space_less_str);
tPluralForms::const_iterator it= plural_forms.find(space_less_str);
if (it != plural_forms.end())
{
return it->second;

View File

@ -58,11 +58,12 @@ const bool REMOVE_BOM = false;
/** The list of available languages; this is global so that it is cached (and remains
even if the translations object is deleted and re-created) */
std::vector<std::string> g_language_list;
typedef std::vector<std::string> LanguageList;
LanguageList g_language_list;
// Note : this method is not static because 'g_language_list' is initialized
// the first time Translations is constructed (despite being a global)
const std::vector<std::string>* Translations::getLanguageList() const
const LanguageList* Translations::getLanguageList() const
{
return &g_language_list;
}