From f7bbe8a8dde55b8dfa79303e2ab5bd7dc2b56455 Mon Sep 17 00:00:00 2001 From: liyaoyao777 Date: Wed, 28 Aug 2024 11:26:58 +0800 Subject: [PATCH] Rectify utils/common namespace irregularities Signed-off-by: liyaoyao777 --- utils/common/include/app_thread_info.h | 6 +++--- utils/common/include/death_recipient_template.h | 6 +++--- utils/common/include/file_utils.h | 6 +++--- utils/common/include/json_parser.h | 6 +++--- utils/common/include/light_animation_ipc.h | 6 +++--- utils/common/include/light_info_ipc.h | 6 +++--- utils/common/include/miscdevice_common.h | 6 +++--- utils/common/include/miscdevice_delayed_sp_singleton.h | 6 +++--- utils/common/include/permission_util.h | 6 +++--- utils/common/include/raw_file_descriptor.h | 6 +++--- utils/common/include/sensors_errors.h | 6 +++--- utils/common/include/vibrator_infos.h | 6 +++--- utils/common/src/file_utils.cpp | 6 +++--- utils/common/src/json_parser.cpp | 4 ++-- utils/common/src/light_animation_ipc.cpp | 4 ++-- utils/common/src/light_info_ipc.cpp | 4 ++-- utils/common/src/permission_util.cpp | 4 ++-- utils/common/src/vibrator_infos.cpp | 4 ++-- 18 files changed, 49 insertions(+), 49 deletions(-) diff --git a/utils/common/include/app_thread_info.h b/utils/common/include/app_thread_info.h index 0a765d1..08db0f7 100755 --- a/utils/common/include/app_thread_info.h +++ b/utils/common/include/app_thread_info.h @@ -23,6 +23,6 @@ struct AppThreadInfo { int32_t uid; AppThreadInfo() : pid(0), uid(0) {}; }; -} // namespace Sensors -} // namespace OHOS -#endif // APP_THREAD_INFO_H +} // namespace Sensors +} // namespace OHOS +#endif // APP_THREAD_INFO_H diff --git a/utils/common/include/death_recipient_template.h b/utils/common/include/death_recipient_template.h index 7e5ad58..4ce667a 100755 --- a/utils/common/include/death_recipient_template.h +++ b/utils/common/include/death_recipient_template.h @@ -33,6 +33,6 @@ public: private: T &privateData_; }; -} // namespace Sensors -} // namespace OHOS -#endif // DEATH_RECIPIENT_TEMPLATE_H +} // namespace Sensors +} // namespace OHOS +#endif // DEATH_RECIPIENT_TEMPLATE_H diff --git a/utils/common/include/file_utils.h b/utils/common/include/file_utils.h index 6b5f5b9..274a34b 100755 --- a/utils/common/include/file_utils.h +++ b/utils/common/include/file_utils.h @@ -38,6 +38,6 @@ std::string ReadFd(const RawFileDescriptor &rawFd); std::string GetFileSuffix(int32_t fd); int32_t GetFileName(const int32_t &fd, std::string &fileName); int32_t GetFileExtName(const int32_t &fd, std::string &extName); -} // namespace Sensors -} // namespace OHOS -#endif // MISCDEVICE_FILE_UTILS_H +} // namespace Sensors +} // namespace OHOS +#endif // MISCDEVICE_FILE_UTILS_H diff --git a/utils/common/include/json_parser.h b/utils/common/include/json_parser.h index 10d9a34..093e559 100755 --- a/utils/common/include/json_parser.h +++ b/utils/common/include/json_parser.h @@ -47,6 +47,6 @@ public: private: cJSON *cJson_ = nullptr; }; -} // namespace Sensors -} // namespace OHOS -#endif // MISCDEVICE_JSON_PARSER_H \ No newline at end of file +} // namespace Sensors +} // namespace OHOS +#endif // MISCDEVICE_JSON_PARSER_H \ No newline at end of file diff --git a/utils/common/include/light_animation_ipc.h b/utils/common/include/light_animation_ipc.h index e81a85b..47f8535 100644 --- a/utils/common/include/light_animation_ipc.h +++ b/utils/common/include/light_animation_ipc.h @@ -39,6 +39,6 @@ private: int32_t onTime_ = 0; int32_t offTime_ = 0; }; -} // namespace Sensors -} // namespace OHOS -#endif // LIGHT_ANIMATION_IPC_H +} // namespace Sensors +} // namespace OHOS +#endif // LIGHT_ANIMATION_IPC_H diff --git a/utils/common/include/light_info_ipc.h b/utils/common/include/light_info_ipc.h index 5ec4093..5f81d02 100644 --- a/utils/common/include/light_info_ipc.h +++ b/utils/common/include/light_info_ipc.h @@ -44,6 +44,6 @@ private: int32_t lightNumber_ = 0; int32_t lightType_ = 0; }; -} // namespace Sensors -} // namespace OHOS -#endif // LIGHT_INFO_IPC_H +} // namespace Sensors +} // namespace OHOS +#endif // LIGHT_INFO_IPC_H diff --git a/utils/common/include/miscdevice_common.h b/utils/common/include/miscdevice_common.h index f04b6c6..4a71ec5 100755 --- a/utils/common/include/miscdevice_common.h +++ b/utils/common/include/miscdevice_common.h @@ -39,6 +39,6 @@ public: MiscdeviceCommon() = default; ~MiscdeviceCommon() = default; }; -} // namespace Sensors -} // namespace OHOS -#endif // MISCDEVICE_COMMON_H +} // namespace Sensors +} // namespace OHOS +#endif // MISCDEVICE_COMMON_H diff --git a/utils/common/include/miscdevice_delayed_sp_singleton.h b/utils/common/include/miscdevice_delayed_sp_singleton.h index 5be3b80..49fa02c 100644 --- a/utils/common/include/miscdevice_delayed_sp_singleton.h +++ b/utils/common/include/miscdevice_delayed_sp_singleton.h @@ -68,6 +68,6 @@ void MiscdeviceDelayedSpSingleton::DestroyInstance() instance_ = nullptr; } } -} // namespace Sensors -} // namespace OHOS -#endif // MISCDEVICE_DELAYED_SP_SINGLETON_H \ No newline at end of file +} // namespace Sensors +} // namespace OHOS +#endif // MISCDEVICE_DELAYED_SP_SINGLETON_H \ No newline at end of file diff --git a/utils/common/include/permission_util.h b/utils/common/include/permission_util.h index fd6adf1..7466828 100644 --- a/utils/common/include/permission_util.h +++ b/utils/common/include/permission_util.h @@ -32,6 +32,6 @@ public: virtual ~PermissionUtil() {}; int32_t CheckVibratePermission(AccessTokenID callerToken, const std::string &permissionName); }; -} // namespace Sensors -} // namespace OHOS -#endif // PERMISSION_UTIL_H +} // namespace Sensors +} // namespace OHOS +#endif // PERMISSION_UTIL_H diff --git a/utils/common/include/raw_file_descriptor.h b/utils/common/include/raw_file_descriptor.h index 04c0445..54a84bd 100644 --- a/utils/common/include/raw_file_descriptor.h +++ b/utils/common/include/raw_file_descriptor.h @@ -25,6 +25,6 @@ struct RawFileDescriptor { int64_t offset = 0; int64_t length = -1; }; -} // namespace Sensors -} // namespace OHOS -#endif // RAW_FILE_DESCRIPTOR +} // namespace Sensors +} // namespace OHOS +#endif // RAW_FILE_DESCRIPTOR diff --git a/utils/common/include/sensors_errors.h b/utils/common/include/sensors_errors.h index 2aca15a..5214aa5 100644 --- a/utils/common/include/sensors_errors.h +++ b/utils/common/include/sensors_errors.h @@ -294,6 +294,6 @@ private: } \ } while (0) #endif -} // namespace Sensors -} // namespace OHOS -#endif // SENSORS_ERRORS_H +} // namespace Sensors +} // namespace OHOS +#endif // SENSORS_ERRORS_H diff --git a/utils/common/include/vibrator_infos.h b/utils/common/include/vibrator_infos.h index 47f820f..04887f4 100644 --- a/utils/common/include/vibrator_infos.h +++ b/utils/common/include/vibrator_infos.h @@ -140,6 +140,6 @@ struct VibrateParameter { bool Marshalling(Parcel &parcel) const; std::optional Unmarshalling(Parcel &data); }; -} // namespace Sensors -} // namespace OHOS -#endif // VIBRATOR_INFOS_H +} // namespace Sensors +} // namespace OHOS +#endif // VIBRATOR_INFOS_H diff --git a/utils/common/src/file_utils.cpp b/utils/common/src/file_utils.cpp index cc2b195..c580128 100755 --- a/utils/common/src/file_utils.cpp +++ b/utils/common/src/file_utils.cpp @@ -33,7 +33,7 @@ constexpr int32_t FILE_SIZE_MAX = 0x5000; constexpr int64_t READ_DATA_BUFF_SIZE = 256; constexpr int32_t INVALID_FILE_SIZE = -1; constexpr int32_t FILE_PATH_MAX = 1024; -} // namespace +} // namespace std::string ReadJsonFile(const std::string &filePath) { @@ -235,5 +235,5 @@ std::string GetFileSuffix(int32_t fd) } return fileAbsolutePath.substr(pos + 1); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/utils/common/src/json_parser.cpp b/utils/common/src/json_parser.cpp index 061a7d9..c6acb2f 100755 --- a/utils/common/src/json_parser.cpp +++ b/utils/common/src/json_parser.cpp @@ -145,5 +145,5 @@ std::string JsonParser::GetStringValue(cJSON *json) const } return json->valuestring; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/utils/common/src/light_animation_ipc.cpp b/utils/common/src/light_animation_ipc.cpp index 4ffb49b..6cbc04c 100644 --- a/utils/common/src/light_animation_ipc.cpp +++ b/utils/common/src/light_animation_ipc.cpp @@ -83,5 +83,5 @@ bool LightAnimationIPC::ReadFromParcel(Parcel &parcel) { return (parcel.ReadInt32(mode_)) && (parcel.ReadInt32(onTime_)) && (parcel.ReadInt32(offTime_)); } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/utils/common/src/light_info_ipc.cpp b/utils/common/src/light_info_ipc.cpp index a7ccaea..ca6519e 100644 --- a/utils/common/src/light_info_ipc.cpp +++ b/utils/common/src/light_info_ipc.cpp @@ -98,5 +98,5 @@ bool LightInfoIPC::ReadFromParcel(Parcel &parcel) return (parcel.ReadString(lightName_)) && (parcel.ReadInt32(lightId_)) && (parcel.ReadInt32(lightNumber_)) && (parcel.ReadInt32(lightType_)); } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/utils/common/src/permission_util.cpp b/utils/common/src/permission_util.cpp index 2ca66c1..2fdbd52 100644 --- a/utils/common/src/permission_util.cpp +++ b/utils/common/src/permission_util.cpp @@ -24,5 +24,5 @@ int32_t PermissionUtil::CheckVibratePermission(AccessTokenID callerToken, const { return AccessTokenKit::VerifyAccessToken(callerToken, permissionName); } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/utils/common/src/vibrator_infos.cpp b/utils/common/src/vibrator_infos.cpp index bced1ee..8ac1e47 100644 --- a/utils/common/src/vibrator_infos.cpp +++ b/utils/common/src/vibrator_infos.cpp @@ -283,5 +283,5 @@ std::optional VibrateParameter::Unmarshalling(Parcel &data) } return parameter; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS -- Gitee