From 624dff1b96fe4de23ccaee7b0a82206b905d5e39 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Thu, 17 Feb 2022 23:07:01 -0500 Subject: [PATCH] gamedb: move away from deprecated `ryml::parse` func --- pcsx2/GameDatabase.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 348b1985b8..14d0e66cbc 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -465,15 +465,14 @@ void GameDatabase::initDatabase() }); try { - std::optional> buf(Host::ReadResourceFile(GAMEDB_YAML_FILE_NAME)); + auto buf = Host::ReadResourceFileToString(GAMEDB_YAML_FILE_NAME); if (!buf.has_value()) { Console.Error("[GameDB] Unable to open GameDB file, file does not exist."); return; } - const ryml::substr view = c4::basic_substring(reinterpret_cast(buf->data()), buf->size()); - ryml::Tree tree = ryml::parse(view); + ryml::Tree tree = ryml::parse_in_arena(c4::to_csubstr(buf.value())); ryml::NodeRef root = tree.rootref(); for (const ryml::NodeRef& n : root.children())