mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-03 04:05:49 +01:00
Fix compatibility with GCC 13.1
This commit is contained in:
@@ -73,7 +73,12 @@ public:
|
||||
{
|
||||
throw std::runtime_error("Unable to open " + path);
|
||||
}
|
||||
return std::string((std::istreambuf_iterator<char>(fs)), std::istreambuf_iterator<char>());
|
||||
auto length = fs.tellg();
|
||||
char* buffer = new char[length];
|
||||
fs.read(buffer, length);
|
||||
auto result = std::string(buffer, buffer + length);
|
||||
delete[] buffer;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user