Blob Blame History Raw
diff -up ./include/ignition/math/Helpers.hh.arm ./include/ignition/math/Helpers.hh
--- ./include/ignition/math/Helpers.hh.arm	2017-01-05 16:51:02.000000000 -0500
+++ ./include/ignition/math/Helpers.hh	2017-02-19 13:28:07.226984728 -0500
@@ -707,7 +707,9 @@ namespace ignition
 
     // Degrade precision on Windows, which cannot handle 'long double'
     // values properly. See the implementation of Unpair.
-#ifdef _MSC_VER
+    // 32 bit ARM processors also define 'long double' to be the same
+    // size as 'double', and must also be degraded
+#if defined _MSC_VER || defined __arm__
     using PairInput = uint16_t;
     using PairOutput = uint32_t;
 #else
diff -up ./src/Helpers_TEST.cc.arm ./src/Helpers_TEST.cc
--- ./src/Helpers_TEST.cc.arm	2017-02-19 13:28:07.227984768 -0500
+++ ./src/Helpers_TEST.cc	2017-02-19 13:33:18.179230962 -0500
@@ -330,7 +330,7 @@ TEST(HelpersTest, Volume)
 /////////////////////////////////////////////////
 TEST(HelpersTest, Pair)
 {
-#ifdef _MSC_VER
+#if defined _MSC_VER || defined __arm__
   math::PairInput maxA = math::MAX_UI16;
   math::PairInput maxB = math::MAX_UI16;
 #else
@@ -342,7 +342,7 @@ TEST(HelpersTest, Pair)
 
   // Maximum parameters should generate a maximum key
   math::PairOutput maxKey = math::Pair(maxA, maxB);
-#ifdef _MSC_VER
+#if defined _MSC_VER || defined __arm__
   EXPECT_EQ(maxKey, math::MAX_UI32);
 #else
   EXPECT_EQ(maxKey, math::MAX_UI64);
@@ -352,7 +352,7 @@ TEST(HelpersTest, Pair)
   EXPECT_EQ(maxC, maxA);
   EXPECT_EQ(maxD, maxB);
 
-#ifdef _MSC_VER
+#if defined _MSC_VER || defined __arm__
   math::PairInput minA = math::MIN_UI16;
   math::PairInput minB = math::MIN_UI16;
 #else
@@ -363,7 +363,7 @@ TEST(HelpersTest, Pair)
 
   // Minimum parameters should generate a minimum key
   math::PairOutput minKey = math::Pair(minA, minB);
-#ifdef _MSC_VER
+#if defined _MSC_VER || defined __arm__
   EXPECT_EQ(minKey, math::MIN_UI32);
 #else
   EXPECT_EQ(minKey, math::MIN_UI64);
@@ -414,7 +414,7 @@ TEST(HelpersTest, Pair)
       }
     }
 
-#ifndef _MSC_VER
+#if defined _MSC_VER || defined __arm__
     // Iterate over large numbers, and check for unique keys.
     for (math::PairInput a = math::MAX_UI32-5000; a < math::MAX_UI32; a++)
     {