mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00: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
@ -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…
Reference in New Issue
Block a user