From d2be6a7c089427a6ff1b6c39794fc80dca1a3a2e Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 22 Aug 2024 17:59:21 +0200 Subject: [PATCH] langid: address MSVC warnings Signed-off-by: Simon Rozman --- include/stdex/langid.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/stdex/langid.hpp b/include/stdex/langid.hpp index 28cc62182..20737995b 100644 --- a/include/stdex/langid.hpp +++ b/include/stdex/langid.hpp @@ -96,7 +96,7 @@ namespace stdex } } }; - static const std::map languages = { + static const std::map languages = { {"af-ZA", 0x436}, // Afrikaans (South Africa) {"af", 0x36}, // Afrikaans {"am-ET", 0x45e}, // Amharic (Ethiopia) @@ -534,7 +534,7 @@ namespace stdex {"zu", 0x35}, // isiZulu }; if (auto el = languages.find(rfc1766); el != languages.end()) - return el->second; + return static_cast(el->second); return langid_unknown; } @@ -548,7 +548,7 @@ namespace stdex /// inline _Ret_maybenull_z_ const char* rfc1766_from_langid(_In_ langid lang, _In_opt_z_ const char* fallback = nullptr) { - static const std::map languages = { + static const std::map languages = { {0x1, "ar"}, // Arabic {0x401, "ar-SA"}, // Arabic (Saudi Arabia) {0x801, "ar-IQ"}, // Arabic (Iraq)