Permalink
Browse files

Merge pull request #6812 from lioncash/mem

DolphinQt2/MemoryWidget: Use QString's toUtf8() where applicable instead of toStdString()
  • Loading branch information...
spycrab committed May 11, 2018
2 parents 3cca051 + 6d0cab3 commit 2b8d69f476300c01a03695cb51515eff3e2208b9
Showing with 4 additions and 6 deletions.
  1. +4 −6 Source/Core/DolphinQt2/Debugger/MemoryWidget.cpp
@@ -385,9 +385,9 @@ void MemoryWidget::OnSetValue()
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++);
}
else
@@ -471,10 +471,8 @@ std::vector<u8> MemoryWidget::GetValueData() const
if (m_find_ascii->isChecked())
{
std::string s = m_data_edit->text().toStdString();
for (char c : s)
search_for.push_back(c);
const QByteArray bytes = m_data_edit->text().toUtf8();
search_for.assign(bytes.begin(), bytes.end());
}
else
{

0 comments on commit 2b8d69f

Please sign in to comment.