mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
PSF: Fix string_view optimization
Avoid redundant copies of std::string.
This commit is contained in:
parent
a8d5a8734a
commit
a3e8a61547
2 changed files with 6 additions and 6 deletions
|
|
@ -59,7 +59,7 @@ namespace psf
|
|||
};
|
||||
|
||||
|
||||
entry::entry(format type, u32 max_size, const std::string& value)
|
||||
entry::entry(format type, u32 max_size, std::string_view value)
|
||||
: m_type(type)
|
||||
, m_max_size(max_size)
|
||||
, m_value_string(value)
|
||||
|
|
@ -91,7 +91,7 @@ namespace psf
|
|||
return m_value_integer;
|
||||
}
|
||||
|
||||
entry& entry::operator =(const std::string& value)
|
||||
entry& entry::operator =(std::string_view value)
|
||||
{
|
||||
ensure(m_type == format::string || m_type == format::array);
|
||||
m_value_string = value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue