Skip to content
Snippets Groups Projects
Commit fc93cf0e authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a return statement in all the functions returning a value.

Removed some unused internal variables.
parent 13d62b4e
No related branches found
No related tags found
No related merge requests found
......@@ -503,8 +503,6 @@ class CModuleAction
template<class action_ros>
CModuleAction<action_ros>::CModuleAction(const std::string &name,const std::string &name_space):nh(ros::this_node::getName()+"/"+name_space)
{
std::size_t position;
this->name=this->nh.getNamespace()+"/"+name;
this->status=ACTION_IDLE;
// retry control
......
......@@ -231,6 +231,7 @@ bool CModuleDynReconf::set_parameter(const std::string &name,bool value)
case ACT_SRV_FAIL: ROS_ERROR_STREAM("CModuleDynReconf::set_parameters: Request failed on server: " << this->get_name());
return false;
break;
default: return false;
}
}
......@@ -255,6 +256,7 @@ bool CModuleDynReconf::set_parameter(const std::string &name,int value)
case ACT_SRV_FAIL: ROS_ERROR_STREAM("CModuleDynReconf::set_parameters: Request failed on server: " << this->get_name());
return false;
break;
default: return false;
}
}
......@@ -279,6 +281,7 @@ bool CModuleDynReconf::set_parameter(const std::string &name,std::string &value)
case ACT_SRV_FAIL: ROS_ERROR_STREAM("CModuleDynReconf::set_parameters: Request failed on server: " << this->get_name());
return false;
break;
default: return false;
}
}
......@@ -303,6 +306,7 @@ bool CModuleDynReconf::set_parameter(const std::string &name,double value)
case ACT_SRV_FAIL: ROS_ERROR_STREAM("CModuleDynReconf::set_parameters: Request failed on server: " << this->get_name());
return false;
break;
default: return false;
}
}
......
......@@ -171,8 +171,6 @@ class CModuleService
template<class service_msg>
CModuleService<service_msg>::CModuleService(const std::string &name,const std::string &name_space):nh(ros::this_node::getName()+"/"+name_space)
{
std::size_t position;
this->current_num_retries=0;
this->max_num_retries=DEFAULT_SERVICE_MAX_RETRIES;
this->service_client=this->nh.template serviceClient<service_msg>(name);
......
......@@ -44,6 +44,8 @@ bool CROSTimeout::timed_out(void)
return false;
}
}
else
return false;
}
CROSTimeout::~CROSTimeout()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment