mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Use a better constructor in StringBuilder::GetStdString
This commit is contained in:
@@ -138,13 +138,7 @@ public:
|
||||
*/
|
||||
std::string GetStdString() const
|
||||
{
|
||||
std::string result;
|
||||
result.reserve(_length);
|
||||
for (std::size_t i = 0U; i < _length; i++)
|
||||
{
|
||||
result.push_back(_buffer[i]);
|
||||
}
|
||||
return result;
|
||||
return std::string(_buffer, _length);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user