octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44970] Build fails on ARM because qreal is a


From: Orion Poplawski
Subject: [Octave-bug-tracker] [bug #44970] Build fails on ARM because qreal is a typedef for float
Date: Thu, 30 Apr 2015 22:12:04 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #3, bug #44970 (project octave):

That fails with:

graphics/QtHandlesUtils.cc: In function 'Matrix QtHandles::Utils::toRgb(const
QColor&)':
graphics/QtHandlesUtils.cc:158:36: error: no matching function for call to
'QColor::getRgbF(qreal&, qreal&, qreal&) const'
   c.getRgbF (tmp[0], tmp[1], tmp[2]);

I think it would be:

diff -r 3797df921988 libgui/graphics/QtHandlesUtils.cc
--- a/libgui/graphics/QtHandlesUtils.cc Wed Apr 29 17:09:24 2015 -0700
+++ b/libgui/graphics/QtHandlesUtils.cc Thu Apr 30 22:38:27 2015 +0200
@@ -152,7 +152,12 @@
   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);
+  for (k=0; k<3; ++k)
+    rgbData[k] = tmp[k];

   return rgb;
 }

Ugly, yes, but I don't have another suggestion.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44970>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]