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.
This commit is contained in:
2025-09-22 15:08:33 +08:00
parent 48cae46960
commit 7afb7e2b77

View File

@@ -154,8 +154,7 @@ bool CustomRobot::SwitchService(const std::string& serviceName, bool enable) {
} }
try { try {
int32_t status; int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0);
int32_t ret = rsc_->ServiceSwitch(serviceName, enable ? 1 : 0, status);
if (ret != 0) { if (ret != 0) {
LOG_ERROR("Failed to switch service " + serviceName + ", error code: " + std::to_string(ret)); LOG_ERROR("Failed to switch service " + serviceName + ", error code: " + std::to_string(ret));
return false; return false;