changeset 20150:6446649e42c1 stable

Allow Qt GUI to compile on ARM CPU architectures (bug #44970). * QtHandlesUtils.cc (toRGB): Instantiate a temporary array of qreal which is used for the return results of getRgbF(). Copy data from qreal into octave Matrix of base type double.
author Orion Poplawski <orion@cora.nwra.com>
date Fri, 01 May 2015 13:11:51 -0700
parents 4a41b7d426b6
children 8187a66039e4
files libgui/graphics/QtHandlesUtils.cc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/QtHandlesUtils.cc	Fri May 01 08:29:52 2015 -0700
+++ b/libgui/graphics/QtHandlesUtils.cc	Fri May 01 13:11:51 2015 -0700
@@ -152,7 +152,11 @@
   Matrix rgb (1, 3);
   double* rgbData = rgb.fortran_vec ();
 
-  c.getRgbF (rgbData, rgbData+1, rgbData+2);
+  // qreal is a typedef for double except for ARM CPU architectures
+  // where it is a typedef for float (Bug #44970).
+  qreal tmp[3];
+  c.getRgbF (tmp, tmp+1, tmp+2);
+  rgbData[0] = tmp[0]; rgbData[1] = tmp[1]; rgbData[2] = tmp[2];
 
   return rgb;
 }