Skip to content

Commit 14b1763

Browse files
Use dynamicgraph::size_type instead of int.
1 parent a39d1a9 commit 14b1763

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/roscontrol-sot-controller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using namespace rc_sot_system;
6161
namespace sot_controller {
6262
typedef std::map<std::string, std::string>::iterator it_map_rt_to_sot;
6363
typedef std::map<std::string, std::string>::iterator it_control_mode;
64-
64+
typedef dynamicgraph::size_type size_type;
6565
ControlPDMotorControlData::ControlPDMotorControlData() {}
6666

6767
void ControlPDMotorControlData::read_from_xmlrpc_value(
@@ -171,7 +171,7 @@ bool RCSotController::initRequest(lhi::RobotHW *robot_hw,
171171
ROS_WARN("initRequest 4");
172172
/// Create SoT
173173
SotLoaderBasic::Initialization();
174-
sotController_->setControlSize((int)joints_name_.size());
174+
sotController_->setControlSize((size_type)joints_name_.size());
175175
ROS_WARN("initRequest 5");
176176
return true;
177177
}

tests/sot-test-controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void SoTTestController::getControl(
101101
}
102102
}
103103

104-
void SoTTestController::setControlSize(const int &size) {
104+
void SoTTestController::setControlSize(const size_type &size) {
105105
device_->setControlSize(size);
106106
}
107107

tests/sot-test-controller.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace dgsot = dynamicgraph::sot;
2525

2626
class SoTTestController : public dgsot::AbstractSotExternalInterface {
2727
public:
28+
typedef dynamicgraph::size_type size_type;
2829
static const std::string LOG_PYTHON;
2930

3031
SoTTestController();
@@ -41,7 +42,7 @@ class SoTTestController : public dgsot::AbstractSotExternalInterface {
4142
void getControl(std::map<std::string, dgsot::ControlValues> &anglesOut,
4243
const double &period);
4344

44-
void setControlSize(const int &size);
45+
void setControlSize(const size_type &size);
4546
void initialize();
4647
void setNoIntegration(void);
4748
void setSecondOrderIntegration(void);

0 commit comments

Comments
 (0)