From 0e4edb209369a81de03b556cca1e6f9a653bee63 Mon Sep 17 00:00:00 2001 From: zhangdd_ewan Date: Tue, 30 Jan 2024 12:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9codecity=E4=BB=A3=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangdd_ewan --- frameworks/i18n/src/locale_info.cpp | 13 ------------- interfaces/kits/i18n/include/locale_info.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/frameworks/i18n/src/locale_info.cpp b/frameworks/i18n/src/locale_info.cpp index a9743bf..03c34ae 100644 --- a/frameworks/i18n/src/locale_info.cpp +++ b/frameworks/i18n/src/locale_info.cpp @@ -19,19 +19,6 @@ #include "types.h" #include "locale_info.h" -static constexpr uint16_t OPT_LANG = 0x0001; -static constexpr uint16_t OPT_SCRIPT = 0x0002; -static constexpr uint16_t OPT_REGION = 0x0004; -static constexpr uint16_t OPT_EXTENSION = 0x0008; -static constexpr uint8_t TAG_COMMON = 0; -static constexpr uint8_t TAG_U = 1; -static constexpr uint8_t TAG_KEY = 2; -static constexpr uint8_t TAG_VALUE = 3; -static constexpr int LANGUAGE_MIN_LENGTH = 2; -static constexpr int LANGUAGE_MAX_LENGTH = 3; -static constexpr int REGION_LENGTH = 2; -static constexpr int SCRIPT_LENGTH = 4; - using namespace OHOS::I18N; void LocaleInfo::Init(const char *newLang, const char *newScript, const char *newRegion, int &status) diff --git a/interfaces/kits/i18n/include/locale_info.h b/interfaces/kits/i18n/include/locale_info.h index 529778d..109baa0 100644 --- a/interfaces/kits/i18n/include/locale_info.h +++ b/interfaces/kits/i18n/include/locale_info.h @@ -211,6 +211,18 @@ private: void SetFail(); void Init(const char *lang, const char *script, const char *region, int &status); const int CHAR_OFF = 48; + static constexpr uint16_t OPT_LANG = 0x0001; + static constexpr uint16_t OPT_SCRIPT = 0x0002; + static constexpr uint16_t OPT_REGION = 0x0004; + static constexpr uint16_t OPT_EXTENSION = 0x0008; + static constexpr uint8_t TAG_COMMON = 0; + static constexpr uint8_t TAG_U = 1; + static constexpr uint8_t TAG_KEY = 2; + static constexpr uint8_t TAG_VALUE = 3; + static constexpr int LANGUAGE_MIN_LENGTH = 2; + static constexpr int LANGUAGE_MAX_LENGTH = 3; + static constexpr int REGION_LENGTH = 2; + static constexpr int SCRIPT_LENGTH = 4; }; enum ESupportScript { -- Gitee