use C++ style cast instead of C-style cast
This commit is contained in:
@@ -1250,7 +1250,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
// Fix the incorrect string type on title to display correctly
|
||||||
const char* name = (LPCSTR)thisPack->getName().c_str();
|
const char* name = static_cast<const char*>(thisPack->getName().c_str());
|
||||||
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
||||||
std::wstring wName(len, 0);
|
std::wstring wName(len, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
||||||
@@ -1275,7 +1275,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
// Fix the incorrect string type on title to display correctly
|
||||||
const char* name = (LPCSTR)thisPack->getName().c_str();
|
const char* name = static_cast<const char*>(thisPack->getName().c_str());
|
||||||
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
||||||
std::wstring wName(len, 0);
|
std::wstring wName(len, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
||||||
@@ -1300,7 +1300,7 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
|
|||||||
{
|
{
|
||||||
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
|
||||||
// Fix the incorrect string type on title to display correctly
|
// Fix the incorrect string type on title to display correctly
|
||||||
const char* name = (LPCSTR)thisPack->getName().c_str();
|
const char* name = static_cast<const char*>(thisPack->getName().c_str());
|
||||||
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
|
||||||
std::wstring wName(len, 0);
|
std::wstring wName(len, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
|
||||||
|
|||||||
Reference in New Issue
Block a user