From 105e04c4729e5723f80c3ad3c3d31e2ee1ec2f47 Mon Sep 17 00:00:00 2001 From: zhouyan Date: Tue, 10 Jun 2025 11:29:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I5cba8a552edb540ff81a573c92bfbc0c9667717b --- interfaces/innerkits/accesstoken/include/access_token.h | 4 ++-- .../innerkits/accesstoken/include/atm_tools_param_info.h | 4 +--- .../privacy/include/on_permission_used_record_callback.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/interfaces/innerkits/accesstoken/include/access_token.h b/interfaces/innerkits/accesstoken/include/access_token.h index a398581ce..651a28d6c 100644 --- a/interfaces/innerkits/accesstoken/include/access_token.h +++ b/interfaces/innerkits/accesstoken/include/access_token.h @@ -48,8 +48,8 @@ namespace AccessToken { typedef unsigned int AccessTokenID; typedef uint64_t FullTokenID; typedef unsigned int AccessTokenAttr; -static const int DEFAULT_TOKEN_VERSION = 1; -static const AccessTokenID INVALID_TOKENID = 0; +constexpr const int DEFAULT_TOKEN_VERSION = 1; +constexpr const AccessTokenID INVALID_TOKENID = 0; /** * @brief visit type diff --git a/interfaces/innerkits/accesstoken/include/atm_tools_param_info.h b/interfaces/innerkits/accesstoken/include/atm_tools_param_info.h index bdd8aa7b7..c6326d1e6 100644 --- a/interfaces/innerkits/accesstoken/include/atm_tools_param_info.h +++ b/interfaces/innerkits/accesstoken/include/atm_tools_param_info.h @@ -46,9 +46,7 @@ namespace OHOS { namespace Security { namespace AccessToken { -namespace { -static constexpr uint32_t INVALID_ATM_SET_STATUS = 2; -} +constexpr const uint32_t INVALID_ATM_SET_STATUS = 2; /** * @brief Declares atm tools param class */ diff --git a/interfaces/innerkits/privacy/include/on_permission_used_record_callback.h b/interfaces/innerkits/privacy/include/on_permission_used_record_callback.h index 254bd1f56..b486df7dc 100644 --- a/interfaces/innerkits/privacy/include/on_permission_used_record_callback.h +++ b/interfaces/innerkits/privacy/include/on_permission_used_record_callback.h @@ -35,7 +35,6 @@ #ifndef ON_PERMISSION_USED_RECORD_CALLBACK_H #define ON_PERMISSION_USED_RECORD_CALLBACK_H -#include "errors.h" #include "iremote_broker.h" #include "permission_used_result.h" #include "privacy_permission_record_ipc_interface_code.h" -- Gitee