mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
RSX: Update manual string creation -> std::string()
Replace manual string creation with call to std::string() constructor passing in char* This appears to drastically reduce the cache impact here
This commit is contained in:
parent
8e2b07ba9e
commit
baf96b3eb6
1 changed files with 2 additions and 18 deletions
|
@ -213,15 +213,7 @@ public:
|
|||
|
||||
std::string GetCgParamName(u32 offset) const
|
||||
{
|
||||
std::stringstream str_stream;
|
||||
std::string name;
|
||||
while (m_buffer[offset] != 0)
|
||||
{
|
||||
str_stream << m_buffer[offset];
|
||||
offset++;
|
||||
}
|
||||
name += str_stream.str();
|
||||
return name;
|
||||
return std::string(reinterpret_cast<char*>(&m_buffer[offset]));
|
||||
}
|
||||
|
||||
std::string GetCgParamRes(u32 /*offset*/) const
|
||||
|
@ -233,15 +225,7 @@ public:
|
|||
|
||||
std::string GetCgParamSemantic(u32 offset) const
|
||||
{
|
||||
std::stringstream str_stream;
|
||||
std::string semantic;
|
||||
while (m_buffer[offset] != 0)
|
||||
{
|
||||
str_stream << m_buffer[offset];
|
||||
offset++;
|
||||
}
|
||||
semantic += str_stream.str();
|
||||
return semantic;
|
||||
return std::string(reinterpret_cast<char*>(&m_buffer[offset]));
|
||||
}
|
||||
|
||||
std::string GetCgParamValue(u32 offset, u32 end_offset) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue