aboutsummaryrefslogtreecommitdiff
path: root/src/common/Common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Common.h')
-rw-r--r--src/common/Common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/Common.h b/src/common/Common.h
index 732583da0de..f35773e7c70 100644
--- a/src/common/Common.h
+++ b/src/common/Common.h
@@ -101,6 +101,11 @@ TC_COMMON_API extern char const* localeNames[TOTAL_LOCALES];
TC_COMMON_API LocaleConstant GetLocaleByName(std::string const& name);
+constexpr inline bool IsValidLocale(LocaleConstant locale)
+{
+ return locale < TOTAL_LOCALES&& locale != LOCALE_none;
+}
+
#pragma pack(push, 1)
struct LocalizedString