dynamic::Value simplified

This commit is contained in:
MihailRis
2024-05-07 18:39:12 +03:00
parent 8e83a07094
commit a4c21984d5
26 changed files with 230 additions and 297 deletions
+2 -2
View File
@@ -76,10 +76,10 @@ void langs::loadLocalesInfo(const fs::path& resdir, std::string& fallback) {
if (langs) {
std::cout << "locales ";
for (auto& entry : langs->values) {
auto langInfo = entry.second.get();
auto langInfo = entry.second;
std::string name;
if (auto mapptr = std::get_if<dynamic::Map*>(&langInfo->value)) {
if (auto mapptr = std::get_if<dynamic::Map_sptr>(&langInfo)) {
name = (*mapptr)->get("name", "none"s);
} else {
continue;