robotology / ikart

Components to control the iKart device
GNU General Public License v2.0
1 stars 1 forks source link

Issue with ambiguous function #2

Closed Tobias-Fischer closed 9 years ago

Tobias-Fischer commented 9 years ago

Hi all, I cannot compile the latest version of ikart on our machine. Could you please apply the following diff?

Thanks, Tobias

diff --git a/src/iKartSpeedTest/main.cpp b/src/iKartSpeedTest/main.cpp
index ff7f39e..8716c53 100644
--- a/src/iKartSpeedTest/main.cpp
+++ b/src/iKartSpeedTest/main.cpp
@@ -72,7 +72,7 @@ Windows, Linux
 #include <yarp/dev/PolyDriver.h>
 #include <iCub/DebugInterfaces.h>

-#include <math.h>
+#include <cmath>

 #include <iostream>
 #include <iomanip>
@@ -138,7 +138,7 @@ void CommandClass::stop()

 bool near(double a, double b)
 {
-    if (abs(a-b)<0.0001) return true;
+    if (std::abs(a-b)<0.0001) return true;
     else return false;
 }
randaz81 commented 9 years ago

fixed by 50d8f6b33d