commit v3.8 overwrite this unused code

From commit #13397
This commit is contained in:
Vladimir Perminov 2015-08-27 23:19:30 +03:00
parent 032bc590b7
commit 104013aebe
1 changed files with 0 additions and 47 deletions

View File

@ -484,53 +484,6 @@ bool Audio::IsSoundEffectPaused(unsigned int sound)
return m_soundEffects[sound].m_soundEffectPaused; return m_soundEffects[sound].m_soundEffectPaused;
} }
std::wstring CCUtf8ToUnicode(const char * pszUtf8Str)
{
std::wstring ret;
do
{
if (! pszUtf8Str) break;
size_t len = strlen(pszUtf8Str);
if (len <= 0) break;
++len;
wchar_t * pwszStr = new wchar_t[len];
if (! pwszStr) break;
pwszStr[len - 1] = 0;
MultiByteToWideChar(CP_UTF8, 0, pszUtf8Str, len, pwszStr, len);
ret = pwszStr;
if(pwszStr) {
delete[] (pwszStr);
(pwszStr) = 0;
}
} while (0);
return ret;
}
std::string CCUnicodeToUtf8(const wchar_t* pwszStr)
{
std::string ret;
do
{
if(! pwszStr) break;
size_t len = wcslen(pwszStr);
if (len <= 0) break;
char * pszUtf8Str = new char[len*3 + 1];
WideCharToMultiByte(CP_UTF8, 0, pwszStr, len+1, pszUtf8Str, len*3 + 1, 0, 0);
ret = pszUtf8Str;
if(pszUtf8Str) {
delete[] (pszUtf8Str);
(pszUtf8Str) = 0;
}
}while(0);
return ret;
}
void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic) void Audio::PreloadSoundEffect(const char* pszFilePath, bool isMusic)
{ {
if (m_engineExperiencedCriticalError) { if (m_engineExperiencedCriticalError) {