From 5e2747587edc91f0680720f5263a5c8fdd1cd9e6 Mon Sep 17 00:00:00 2001 From: wuzhihuitmac Date: Thu, 28 Dec 2023 02:02:14 +0000 Subject: [PATCH] Rectification of super large functions Signed-off-by: wuzhihuitmac Change-Id: Ic5766b9c418f53e44d35828b17f9d8f2a02ce510 --- frameworks/native/src/sensor_service_client.cpp | 4 +++- .../core/algorithm/peak_finder/src/peak_finder.cpp | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 frameworks/native/src/sensor_service_client.cpp diff --git a/frameworks/native/src/sensor_service_client.cpp b/frameworks/native/src/sensor_service_client.cpp old mode 100755 new mode 100644 index b258b565..11d78225 --- a/frameworks/native/src/sensor_service_client.cpp +++ b/frameworks/native/src/sensor_service_client.cpp @@ -77,7 +77,9 @@ int32_t SensorServiceClient::InitServiceClient() CHKPR(systemAbilityManager, SENSOR_NATIVE_SAM_ERR); int32_t retry = 0; while (retry < GET_SERVICE_MAX_COUNT) { - sensorServer_ = iface_cast(systemAbilityManager->GetSystemAbility(SENSOR_SERVICE_ABILITY_ID)); + auto object = systemAbilityManager->GetSystemAbility(SENSOR_SERVICE_ABILITY_ID); + CHKPR(object, SENSOR_NATIVE_GET_SERVICE_ERR); + sensorServer_ = iface_cast(object); if (sensorServer_ != nullptr) { SEN_HILOGD("Get service success, retry:%{public}d", retry); serviceDeathObserver_ = new (std::nothrow) DeathRecipientTemplate(*const_cast(this)); diff --git a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp index b9e0023a..9ea09d51 100644 --- a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp +++ b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp @@ -631,14 +631,12 @@ void PeakFinder::SplitLongShortEnvelope(int32_t dataSize, const std::vector