mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
Remove unused IStream::ReadString() function and fix includes
This commit is contained in:
committed by
GitHub
parent
1ccef10b19
commit
0ec76e09d4
@@ -9,30 +9,12 @@
|
||||
|
||||
#include "IStream.hpp"
|
||||
|
||||
#include "../object/Object.h"
|
||||
#include "Memory.hpp"
|
||||
#include "String.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
utf8* IStream::ReadString()
|
||||
{
|
||||
std::vector<utf8> result;
|
||||
|
||||
uint8_t ch;
|
||||
while ((ch = ReadValue<uint8_t>()) != 0)
|
||||
{
|
||||
result.push_back(ch);
|
||||
}
|
||||
result.push_back(0);
|
||||
|
||||
utf8* resultString = Memory::AllocateArray<utf8>(result.size());
|
||||
std::copy(result.begin(), result.end(), resultString);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
std::string IStream::ReadStdString()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
Reference in New Issue
Block a user