fix an ascii/wxstring in gamelistctrl, replace fromascii("") with wxemptystring, don't push_back 0 at the end of wstrings
This commit is contained in:
parent
8f6c25a5aa
commit
825e2ea4df
|
@ -176,7 +176,6 @@ bool CBannerLoaderWii::GetName(std::vector<std::wstring>& _rNames)
|
||||||
{
|
{
|
||||||
temp.push_back(Common::swap16(pBanner->m_Comment[0][i]));
|
temp.push_back(Common::swap16(pBanner->m_Comment[0][i]));
|
||||||
}
|
}
|
||||||
temp.push_back('\0');
|
|
||||||
_rNames.push_back(temp);
|
_rNames.push_back(temp);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +220,6 @@ bool CBannerLoaderWii::GetDescription(std::wstring& _rDescription)
|
||||||
for (int i = 0; i < WII_BANNER_COMMENT_SIZE; ++i)
|
for (int i = 0; i < WII_BANNER_COMMENT_SIZE; ++i)
|
||||||
description.push_back(Common::swap16(pBanner->m_Comment[1][i]));
|
description.push_back(Common::swap16(pBanner->m_Comment[1][i]));
|
||||||
|
|
||||||
description.push_back('\0');
|
|
||||||
_rDescription = description;
|
_rDescription = description;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ wxString CDSPRegTable::GetValue(int row, int col)
|
||||||
{
|
{
|
||||||
case 0: return wxString::FromAscii(pdregname(row));
|
case 0: return wxString::FromAscii(pdregname(row));
|
||||||
case 1: return wxString::Format(wxT("0x%04x"), DSPCore_ReadRegister(row));
|
case 1: return wxString::Format(wxT("0x%04x"), DSPCore_ReadRegister(row));
|
||||||
default: return wxString::FromAscii("");
|
default: return wxEmptyString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return wxString::FromAscii("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDSPRegTable::SetValue(int, int, const wxString &)
|
void CDSPRegTable::SetValue(int, int, const wxString &)
|
||||||
|
|
|
@ -56,18 +56,18 @@ wxString CRegTable::GetValue(int row, int col)
|
||||||
case 2: return wxString::FromAscii(GetFPRName(row));
|
case 2: return wxString::FromAscii(GetFPRName(row));
|
||||||
case 3: return wxString::Format(wxT("%016llx"), riPS0(row));
|
case 3: return wxString::Format(wxT("%016llx"), riPS0(row));
|
||||||
case 4: return wxString::Format(wxT("%016llx"), riPS1(row));
|
case 4: return wxString::Format(wxT("%016llx"), riPS1(row));
|
||||||
default: return wxString::FromAscii("");
|
default: return wxEmptyString;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (row - 32 < NUM_SPECIALS) {
|
if (row - 32 < NUM_SPECIALS) {
|
||||||
switch (col) {
|
switch (col) {
|
||||||
case 0: return wxString::FromAscii(special_reg_names[row - 32]);
|
case 0: return wxString::FromAscii(special_reg_names[row - 32]);
|
||||||
case 1: return wxString::Format(wxT("%08x"), GetSpecialRegValue(row - 32));
|
case 1: return wxString::Format(wxT("%08x"), GetSpecialRegValue(row - 32));
|
||||||
default: return wxString::FromAscii("");
|
default: return wxEmptyString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return wxString::FromAscii("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetSpecialRegValue(int reg, u32 value) {
|
static void SetSpecialRegValue(int reg, u32 value) {
|
||||||
|
|
|
@ -1179,7 +1179,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||||
if (wxFileExists(wxString::FromAscii(OutputFileName.c_str())) &&
|
if (wxFileExists(wxString::FromAscii(OutputFileName.c_str())) &&
|
||||||
wxMessageBox(
|
wxMessageBox(
|
||||||
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
|
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
|
||||||
OutputFileName.c_str()),
|
wxString(OutputFileName.c_str(), *wxConvCurrent).c_str()),
|
||||||
_("Confirm File Overwrite"),
|
_("Confirm File Overwrite"),
|
||||||
wxYES_NO) == wxNO)
|
wxYES_NO) == wxNO)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1207,7 +1207,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||||
if (wxFileExists(wxString::FromAscii(OutputFileName.c_str())) &&
|
if (wxFileExists(wxString::FromAscii(OutputFileName.c_str())) &&
|
||||||
wxMessageBox(
|
wxMessageBox(
|
||||||
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
|
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
|
||||||
OutputFileName.c_str()),
|
wxString(OutputFileName.c_str(), *wxConvCurrent).c_str()),
|
||||||
_("Confirm File Overwrite"),
|
_("Confirm File Overwrite"),
|
||||||
wxYES_NO) == wxNO)
|
wxYES_NO) == wxNO)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue