diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index 5fe275e59c..e7128b3dd7 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -7,13 +7,13 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include #include #include #include #include #include #include +#include #include #include #include @@ -65,18 +65,7 @@ namespace OpenRCT2::Ui::Windows { auto& env = GetContext()->GetPlatformEnvironment(); auto path = env.GetFilePath(pathId); - auto fs = std::ifstream(fs::u8path(path), std::ios::in); - if (!fs.is_open()) - { - throw std::runtime_error("Unable to open " + path); - } - fs.seekg(0, fs.end); - auto length = fs.tellg(); - fs.seekg(0, fs.beg); - std::unique_ptr buffer = std::make_unique(length); - fs.read(buffer.get(), length); - auto result = std::string(buffer.get(), buffer.get() + length); - return result; + return File::ReadAllText(path); } /**