forked from 0ad/0ad
Fixes a few building warnings and convention issues from 19ca1e3ebf
This was SVN commit r15128.
This commit is contained in:
parent
db0376fdc2
commit
c37a8cafc3
@ -132,11 +132,10 @@ L10n::CheckLangAndCountry::CheckLangAndCountry(const Locale& locale) : m_MatchLo
|
||||
{
|
||||
}
|
||||
|
||||
bool L10n::CheckLangAndCountry::operator()(const Locale* const locale)
|
||||
bool L10n::CheckLangAndCountry::operator()(const Locale* const locale) const
|
||||
{
|
||||
bool found = false;
|
||||
found = strcmp(m_MatchLocale.getLanguage(), locale->getLanguage()) == 0;
|
||||
found &= strcmp(m_MatchLocale.getCountry(), locale->getCountry()) == 0;
|
||||
bool found = strcmp(m_MatchLocale.getLanguage(), locale->getLanguage()) == 0
|
||||
&& strcmp(m_MatchLocale.getCountry(), locale->getCountry()) == 0;
|
||||
return found;
|
||||
}
|
||||
|
||||
@ -144,10 +143,9 @@ L10n::CheckLang::CheckLang(const Locale& locale) : m_MatchLocale(locale)
|
||||
{
|
||||
}
|
||||
|
||||
bool L10n::CheckLang::operator()(const Locale* const locale)
|
||||
bool L10n::CheckLang::operator()(const Locale* const locale) const
|
||||
{
|
||||
bool found = false;
|
||||
found = strcmp(m_MatchLocale.getLanguage(), locale->getLanguage()) == 0;
|
||||
bool found = strcmp(m_MatchLocale.getLanguage(), locale->getLanguage()) == 0;
|
||||
return found;
|
||||
}
|
||||
|
||||
@ -163,7 +161,7 @@ std::wstring L10n::GetFallbackToAvailableDictLocale(const Locale& locale)
|
||||
if (strcmp(locale.getCountry(), "") != 0)
|
||||
{
|
||||
CheckLangAndCountry fun(locale);
|
||||
std::vector<Locale*>::iterator itr = find_if(availableLocales.begin(), availableLocales.end(), fun);
|
||||
std::vector<Locale*>::iterator itr = std::find_if(availableLocales.begin(), availableLocales.end(), fun);
|
||||
if (itr != availableLocales.end())
|
||||
{
|
||||
stream << locale.getLanguage() << L"_" << locale.getCountry();
|
||||
@ -172,7 +170,7 @@ std::wstring L10n::GetFallbackToAvailableDictLocale(const Locale& locale)
|
||||
}
|
||||
|
||||
CheckLang fun(locale);
|
||||
std::vector<Locale*>::iterator itr = find_if(availableLocales.begin(), availableLocales.end(), fun);
|
||||
std::vector<Locale*>::iterator itr = std::find_if(availableLocales.begin(), availableLocales.end(), fun);
|
||||
if (itr != availableLocales.end())
|
||||
{
|
||||
stream << locale.getLanguage();
|
||||
|
@ -261,7 +261,10 @@ public:
|
||||
CheckLangAndCountry(const Locale& locale);
|
||||
const Locale& m_MatchLocale;
|
||||
|
||||
bool operator()(const Locale* const locale);
|
||||
bool operator()(const Locale* const locale) const;
|
||||
|
||||
private:
|
||||
const CheckLangAndCountry& operator=(const CheckLangAndCountry&);
|
||||
};
|
||||
|
||||
struct CheckLang
|
||||
@ -269,7 +272,10 @@ public:
|
||||
CheckLang(const Locale& locale);
|
||||
const Locale& m_MatchLocale;
|
||||
|
||||
bool operator()(const Locale* const locale);
|
||||
bool operator()(const Locale* const locale) const;
|
||||
|
||||
private:
|
||||
const CheckLang& operator=(const CheckLang&);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user