Commit a5b83481 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix compilation warnings

parent 1b7f6038
......@@ -357,12 +357,12 @@ namespace hpp {
void print(const hpp::Names_t& v) {
std::cout << "[ ";
for (int i = 0; i < v.length(); i++) std::cout << '"' << v[i] << "\", ";
for (std::size_t i = 0; i < v.length(); i++) std::cout << '"' << v[i] << "\", ";
std::cout << "]";
}
void print(const hpp::corbaserver::manipulation::Namess_t& v) {
std::cout << "[ ";
for (int i = 0; i < v.length(); i++) {
for (std::size_t i = 0; i < v.length(); i++) {
print(v[i]);
std::cout << ", ";
}
......@@ -377,7 +377,7 @@ namespace hpp {
}
void print(const hpp::corbaserver::manipulation::Rules& v) {
std::cout << "[ ";
for (int i = 0; i < v.length(); i++) {
for (std::size_t i = 0; i < v.length(); i++) {
print(v[i]);
std::cout << ", ";
}
......
......@@ -44,12 +44,12 @@ namespace hpp {
foreach (const RuleProxy& rule, rules_) {
rules[i].grippers.length(rule.grippers.size());
rules[i].handles .length(rule.handles .size());
for(std::size_t j = 0; j < rule.grippers.size(); ++j) {
for(int j = 0; j < rule.grippers.size(); ++j) {
QByteArray a = rule.grippers[j].toLocal8Bit();
rules[i].grippers[j] = new char[a.length()+1];
strcpy(rules[i].grippers[0], a.constData());
}
for(std::size_t j = 0; j < rule.grippers.size(); ++j) {
for(int j = 0; j < rule.grippers.size(); ++j) {
QByteArray a = rule.handles[j].toLocal8Bit();
rules[i].handles[j] = new char[a.length()+1];
strcpy(rules[i].handles[j], a.constData());
......@@ -111,7 +111,7 @@ namespace hpp {
void LinkWidget::deleteSelectedRules()
{
foreach (QListWidgetItem *item, ui_->rulesList->selectedItems()) {
for (std::size_t row = 0; row < ui_->rulesList->count(); ++row)
for (int row = 0; row < ui_->rulesList->count(); ++row)
if (item == ui_->rulesList->item(row)) {
rules_.remove(row);
ui_->rulesList->takeItem(row);
......
......@@ -106,7 +106,7 @@ namespace hpp {
QMessageBox::information(this, "hpp-gui", "You have to give a name and select at least one joint");
return ;
}
if (ui->constraintTypeSelect->currentIndex() < funcs_.size()) {
if (ui->constraintTypeSelect->currentIndex() < int(funcs_.size())) {
(*(this->funcs_[ui->constraintTypeSelect->currentIndex()]))(name);
}
}
......@@ -127,7 +127,7 @@ namespace hpp {
QBoxLayout* layoutVar = dynamic_cast<QBoxLayout *>(layout());
if (index < funcs_.size()) {
if (index < int(funcs_.size())) {
if (haveWidget) {
layout()->takeAt(2)->widget()->hide();
}
......
......@@ -134,7 +134,7 @@ namespace hpp {
// TODO I do not remember why this is important...
if (!nodes[i]) nodes[i] = main->osg ()->getGroup(je.bodyNames[i]);
}
CORBA::Short nbDof = plugin_->client()->robot ()->getJointNumberDof (name);
CORBA::Long nbDof = plugin_->client()->robot ()->getJointNumberDof (name);
JointTreeItem* j;
if (nbDof > 0) {
hpp::floatSeq_var c = plugin_->client()->robot ()->getJointConfig (name);
......
......@@ -48,7 +48,7 @@ namespace hpp {
return "Lock joints";
}
void LockedJointConstraint::operator ()(QString const& name)
void LockedJointConstraint::operator ()(QString const&)
{
QList<QListWidgetItem *> selected = jointList_->selectedItems();
......
......@@ -38,8 +38,8 @@ namespace hpp {
void ATwoJointConstraint::firstJointSelect(int index)
{
secondJoint_->clear();
for (unsigned i = 0; i < joints_->length(); i++) {
if (i != index) secondJoint_->addItem(joints_[i].in());
for (std::size_t i = 0; i < joints_->length(); i++) {
if (int(i) != index) secondJoint_->addItem(joints_[i].in());
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment