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