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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user