Blame ctk-qreal_not_double.patch

1593c33
Index: CTK-bdc8caca0458759e1672a94ca2857595d40f17b0/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp
1593c33
===================================================================
1593c33
--- CTK-bdc8caca0458759e1672a94ca2857595d40f17b0.orig/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp
1593c33
+++ CTK-bdc8caca0458759e1672a94ca2857595d40f17b0/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp
1593c33
@@ -295,7 +295,7 @@ void ctkMaterialPropertyPreviewLabel::dr
1593c33
         ref.setZ( 2.*normal.z()*dot - light.z());
1593c33
         ref.normalize();
1593c33
 
1593c33
-        qreal diffuseComp = qMax(diffuse * dot, 0.);
1593c33
+        qreal diffuseComp = qMax<qreal>(diffuse * dot, 0.);
1593c33
 
1593c33
         qreal specularDot = qMax(static_cast<qreal>(QVector3D::dotProduct(ref, view)), static_cast<qreal>(0));
1593c33
 
1593c33
@@ -315,10 +315,10 @@ void ctkMaterialPropertyPreviewLabel::dr
1593c33
           }
1593c33
         else
1593c33
           {
1593c33
-          rgba = qRgba(static_cast<unsigned char>(qMin(255. * intensity.x() * opacity + qRed(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
-                       static_cast<unsigned char>(qMin(255. * intensity.y() * opacity + qGreen(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
-                       static_cast<unsigned char>(qMin(255. * intensity.z() * opacity + qBlue(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
-                       static_cast<unsigned char>(qMin(255. * opacity + qAlpha(rgba)*(1. - opacity), static_cast<qreal>(255.))));
1593c33
+          rgba = qRgba(static_cast<unsigned char>(qMin<qreal>(255. * intensity.x() * opacity + qRed(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
+                       static_cast<unsigned char>(qMin<qreal>(255. * intensity.y() * opacity + qGreen(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
+                       static_cast<unsigned char>(qMin<qreal>(255. * intensity.z() * opacity + qBlue(rgba)*(1. - opacity), static_cast<qreal>(255.))),
1593c33
+                       static_cast<unsigned char>(qMin<qreal>(255. * opacity + qAlpha(rgba)*(1. - opacity), static_cast<qreal>(255.))));
1593c33
           }
1593c33
         }
1593c33
       image.setPixel(i,j,rgba);
7126438
Index: CTK-bdc8caca0458759e1672a94ca2857595d40f17b0/Libs/Widgets/ctkTransferFunctionBarsItem.cpp
7126438
===================================================================
7126438
--- CTK-bdc8caca0458759e1672a94ca2857595d40f17b0.orig/Libs/Widgets/ctkTransferFunctionBarsItem.cpp
7126438
+++ CTK-bdc8caca0458759e1672a94ca2857595d40f17b0/Libs/Widgets/ctkTransferFunctionBarsItem.cpp
7126438
@@ -92,7 +92,7 @@ ctkTransferFunctionBarsItem::~ctkTransfe
7126438
 void ctkTransferFunctionBarsItem::setBarWidth(qreal newBarWidthRatio)
7126438
 {
7126438
   Q_D(ctkTransferFunctionBarsItem);
7126438
-  newBarWidthRatio = qBound(0., newBarWidthRatio, 1.);
7126438
+  newBarWidthRatio = qBound<qreal>(0., newBarWidthRatio, 1.);
7126438
   if (d->BarWidthRatio == newBarWidthRatio)
7126438
     {
7126438
     return;