From 7afb7e2b771ac954cd94a667e06262c79851e6a6 Mon Sep 17 00:00:00 2001 From: Sucan126 <632190820@qq.com> Date: Mon, 22 Sep 2025 15:08:33 +0800 Subject: [PATCH] fix(custom_robot): Remove unused status variable in ServiceSwitch method - Eliminated the unused 'status' variable from the ServiceSwitch method to streamline the code and improve clarity. --- src/custom_robot.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/custom_robot.cpp b/src/custom_robot.cpp index 1635ffe..8503df3 100644 --- a/src/custom_robot.cpp +++ b/src/custom_robot.cpp @@ -154,8 +154,7 @@ bool CustomRobot::SwitchService(const std::string& serviceName, bool enable) { } try { - int32_t status; - int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0, status); + int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0); if (ret != 0) { LOG_ERROR("Failed to switch service " + serviceName + ", error code: " + std::to_string(ret)); return false;