1
0
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:
Øystein Dale
2018-07-18 23:56:29 +02:00
parent 5744509b87
commit de464e2783

View File

@@ -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);
}
/**