Commit ec1750f6 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Fix compilation warnings in 64bit.

parent d8b94049
......@@ -51,8 +51,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
vector_t::size_type configSize;
......@@ -99,7 +97,8 @@ BOOST_AUTO_TEST_CASE (interbody_distances_time_of_computation)
humanoidRobot->computeDistances ();
}
gettimeofday (&t1, NULL);
double t = (t1.tv_sec - t0.tv_sec) + 1e-6*(t1.tv_usec - t0.tv_usec + 0.);
double t = (double)(t1.tv_sec - t0.tv_sec) +
1e-6*(double)(t1.tv_usec - t0.tv_usec);
std::cout << "Time for 1000 self-collision tests in seconds: "
<< t << std::endl;
}
......
......@@ -182,8 +182,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_capsule)
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
std::ofstream fileHrp2;
......
......@@ -109,8 +109,6 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
using hpp::model::Device;
using hpp::model::Joint;
using hpp::model::Body;
typedef hpp::model::ObjectVector_t ObjectVector_t;
typedef hpp::model::JointVector_t JointVector_t;
typedef std::vector<double> vector_t;
std::ifstream fileConfig;
std::ofstream fileHrp2;
......@@ -179,13 +177,13 @@ BOOST_AUTO_TEST_CASE (interbody_distances_mesh)
<< it->fcl.nearest_points [1][1] << ",\t"
<< it->fcl.nearest_points [1][2] << ",\t");
std::pair <std::string, std::string> key (body1, body2);
InterDistances_t::iterator it = interDistances.find (key);
InterDistances_t::iterator itInter = interDistances.find (key);
// Check that pair of bodies is in map
if (it == interDistances.end ()) {
if (itInter == interDistances.end ()) {
throw std::runtime_error ("pair (" + body1 + "," + body2 +
") is not in " + filename);
}
Distance_t distanceFile = it->second;
Distance_t distanceFile = itInter->second;
hppDout (info, "Checking pair " << body1 << ", " << body2);
distance.checkClose (distanceFile);
}
......
......@@ -485,7 +485,7 @@ namespace svd {
}
}
unsigned int project (SVDTest* cp, ResultVector& results)
size_t project (SVDTest* cp, ResultVector& results)
{
MESSAGE_INF ("Start " << results.size() << " projections...");
size_t failCount = 0;
......@@ -518,7 +518,7 @@ namespace svd {
shootConfig (results, &bcs);
for (size_t i = 0; i < cp.size (); i++) {
unsigned int f = project (cp[i], results);
std::size_t f = project (cp[i], results);
if (f > 0) {
MESSAGE_ERR ("----------------------------------------------------------");
......
Markdown is supported
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