Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
[dvbviewer] removed no longer needed AnsiToUtf8()
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Nov 10, 2012
1 parent 3cd5c1e commit b1a0885
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions addons/pvr.dvbviewer/src/DvbData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1045,25 +1045,6 @@ void Dvb::RemoveNullChars(CStdString &String)
}
}

#ifdef WIN32
void Dvb::AnsiToUtf8(std::string &String)
{
const int iLenW = MultiByteToWideChar(CP_ACP, 0, String.c_str(), -1, 0, 0);
wchar_t *wcTmp = new wchar_t[iLenW + 1];
memset(wcTmp, 0, sizeof(wchar_t)*(iLenW + 1));
if (MultiByteToWideChar(CP_ACP, 0, String.c_str(), -1, wcTmp, iLenW + 1))
{
const int iLenU = WideCharToMultiByte(CP_UTF8, 0, wcTmp, -1, NULL, 0, 0, FALSE);
char *cTmp = new char[iLenU + 1];
memset(cTmp, 0, sizeof(char)*(iLenU + 1));
WideCharToMultiByte(CP_UTF8, 0, wcTmp, -1, cTmp, iLenU + 1, 0, FALSE);
String = cTmp;
delete[] cTmp;
}
delete[] wcTmp;
}
#endif

PVR_ERROR Dvb::GetChannelGroups(ADDON_HANDLE handle)
{
for(unsigned int iTagPtr = 0; iTagPtr < m_groups.size(); iTagPtr++)
Expand Down
3 changes: 0 additions & 3 deletions addons/pvr.dvbviewer/src/DvbData.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ class Dvb : public PLATFORM::CThread
bool GetStringLng(XMLNode xRootNode, const char* strTag, CStdString& strStringValue);
CStdString GetPreferredLanguage();
void RemoveNullChars(CStdString &String);
#ifdef WIN32
void AnsiToUtf8(std::string &String);
#endif
bool GetDeviceInfo();


Expand Down

0 comments on commit b1a0885

Please sign in to comment.