Browse Source

VS2003: Add missed fix to eliminate plLocalization::GetLocalizationCodes() on VS2003

rarified/movieplayer
rarified 4 years ago
parent
commit
023850de47
  1. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp
  2. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp
  3. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMoviePlayer/plMoviePlayer.cpp

@ -300,9 +300,11 @@ bool plMoviePlayer::ILoadAudio()
bool plMoviePlayer::ICheckLanguage(const mkvparser::Track* track) bool plMoviePlayer::ICheckLanguage(const mkvparser::Track* track)
{ {
#if defined(_MSC_VER) && _MSC_VER >= 1800
std::set<std::string> codes = plLocalization::GetLanguageCodes(plLocalization::GetLanguage()); std::set<std::string> codes = plLocalization::GetLanguageCodes(plLocalization::GetLanguage());
if (codes.find(track->GetLanguage()) != codes.end()) if (codes.find(track->GetLanguage()) != codes.end())
return true; return true;
#endif
return false; return false;
} }

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.cpp

@ -57,6 +57,7 @@ const char* plLocalization::fLangTags[] =
}; };
const int kLangTagLen = 4; const int kLangTagLen = 4;
#if defined(_MSC_VER) && _MSC_VER >= 1800
std::string fLangCodes_en[] = {"eng", "en"}; std::string fLangCodes_en[] = {"eng", "en"};
std::string fLangCodes_fr[] = {"fre", "fra", "fr"}; std::string fLangCodes_fr[] = {"fre", "fra", "fr"};
std::string fLangCodes_de[] = {"ger", "deu", "de"}; std::string fLangCodes_de[] = {"ger", "deu", "de"};
@ -72,6 +73,7 @@ const std::set<std::string> plLocalization::fLangCodes[] =
std::set<std::string>(std::begin(fLangCodes_it), std::end(fLangCodes_it)), std::set<std::string>(std::begin(fLangCodes_it), std::end(fLangCodes_it)),
std::set<std::string>(std::begin(fLangCodes_ja), std::end(fLangCodes_ja)) std::set<std::string>(std::begin(fLangCodes_ja), std::end(fLangCodes_ja))
}; };
#endif
const char* plLocalization::fLangNames[] = const char* plLocalization::fLangNames[] =
{ {

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plResMgr/plLocalization.h

@ -77,7 +77,9 @@ public:
protected: protected:
static Language fLanguage; static Language fLanguage;
static const char* fLangTags[kNumLanguages]; static const char* fLangTags[kNumLanguages];
#if defined(_MSC_VER) && _MSC_VER >= 1800
static const std::set<std::string> fLangCodes[kNumLanguages]; static const std::set<std::string> fLangCodes[kNumLanguages];
#endif
static const char* fLangNames[kNumLanguages]; static const char* fLangNames[kNumLanguages];
static bool fUsesUnicode[kNumLanguages]; static bool fUsesUnicode[kNumLanguages];
static encodingTypes fUnicodeEncoding[kNumLanguages]; static encodingTypes fUnicodeEncoding[kNumLanguages];

Loading…
Cancel
Save