Work around compiler versions that haven't addressed defect 3865

This commit is contained in:
Evil Eye 2025-07-30 19:41:14 +02:00
parent ee540039a1
commit 75845bf863
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ namespace L10n
msg << " " << l.getName();
}
for (auto& [key, context] : mCache)
updateContext(key.first, *context);
updateContext(std::get<0>(key), *context);
}
void Manager::readLangData(std::string_view name, MessageBundles& ctx, const icu::Locale& lang)
@ -91,7 +91,7 @@ namespace L10n
std::shared_ptr<const MessageBundles> Manager::getContext(
std::string_view contextName, const std::string& fallbackLocaleName)
{
std::pair<std::string_view, std::string_view> key(contextName, fallbackLocaleName);
std::tuple<std::string_view, std::string_view> key(contextName, fallbackLocaleName);
auto it = mCache.find(key);
if (it != mCache.end())
return it->second;

View File

@ -40,7 +40,7 @@ namespace L10n
const VFS::Manager* mVFS;
std::vector<icu::Locale> mPreferredLocales;
std::map<std::pair<std::string, std::string>, std::shared_ptr<MessageBundles>, std::less<>> mCache;
std::map<std::tuple<std::string, std::string>, std::shared_ptr<MessageBundles>, std::less<>> mCache;
std::function<std::string(std::string_view)> mGmstLoader;
};