mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
MemoryViewWidget: Use QStringView with ConvertTextToBytes
Allows for avoiding string copies. While we're at it, we can also mark ConvertTextToBytes as const.
This commit is contained in:
parent
cfd25f1d7c
commit
2b0a9477d0
@ -609,7 +609,7 @@ AddressSpace::Type MemoryViewWidget::GetAddressSpace() const
|
||||
return m_address_space;
|
||||
}
|
||||
|
||||
std::vector<u8> MemoryViewWidget::ConvertTextToBytes(Type type, QString input_text)
|
||||
std::vector<u8> MemoryViewWidget::ConvertTextToBytes(Type type, QStringView input_text) const
|
||||
{
|
||||
if (type == Type::Null)
|
||||
return {};
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
void UpdateFont();
|
||||
void ToggleBreakpoint(u32 addr, bool row);
|
||||
|
||||
std::vector<u8> ConvertTextToBytes(Type type, QString input_text);
|
||||
std::vector<u8> ConvertTextToBytes(Type type, QStringView input_text) const;
|
||||
void SetAddressSpace(AddressSpace::Type address_space);
|
||||
AddressSpace::Type GetAddressSpace() const;
|
||||
void SetDisplay(Type type, int bytes_per_row, int alignment, bool dual_view);
|
||||
|
Loading…
x
Reference in New Issue
Block a user