Merge pull request #6812 from lioncash/mem
DolphinQt2/MemoryWidget: Use QString's toUtf8() where applicable instead of toStdString()
This commit is contained in:
commit
2b8d69f476
|
@ -385,9 +385,9 @@ void MemoryWidget::OnSetValue()
|
||||||
|
|
||||||
if (m_find_ascii->isChecked())
|
if (m_find_ascii->isChecked())
|
||||||
{
|
{
|
||||||
std::string ascii = m_data_edit->text().toStdString();
|
const QByteArray bytes = m_data_edit->text().toUtf8();
|
||||||
|
|
||||||
for (char c : ascii)
|
for (char c : bytes)
|
||||||
PowerPC::HostWrite_U8(static_cast<u8>(c), addr++);
|
PowerPC::HostWrite_U8(static_cast<u8>(c), addr++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -471,10 +471,8 @@ std::vector<u8> MemoryWidget::GetValueData() const
|
||||||
|
|
||||||
if (m_find_ascii->isChecked())
|
if (m_find_ascii->isChecked())
|
||||||
{
|
{
|
||||||
std::string s = m_data_edit->text().toStdString();
|
const QByteArray bytes = m_data_edit->text().toUtf8();
|
||||||
|
search_for.assign(bytes.begin(), bytes.end());
|
||||||
for (char c : s)
|
|
||||||
search_for.push_back(c);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue