WebCore:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jan 2007 15:52:16 +0000 (15:52 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jan 2007 15:52:16 +0000 (15:52 +0000)
        Reviewed by NOBODY (buildbot build fix).

        * ksvg2/svg/ColorDistance.cpp:
        (WebCore::ColorDistance::scaledDistance): Added static cast of arguments to int.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19189 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/ksvg2/svg/ColorDistance.cpp

index 4839f87..5dc30e4 100644 (file)
@@ -1,3 +1,10 @@
+2007-01-27  David Kilzer  <ddkilzer@kilzer.net>
+
+        Reviewed by NOBODY (buildbot build fix).
+
+        * ksvg2/svg/ColorDistance.cpp:
+        (WebCore::ColorDistance::scaledDistance): Added static cast of arguments to int.
+
 2007-01-27  Rob Buis  <buis@kde.org>
 
         Reviewed by NOBODY (typo in method name fix).
index f77fa51..04f1ae3 100644 (file)
@@ -59,7 +59,9 @@ static inline int clampColorValue(int v)
 
 ColorDistance ColorDistance::scaledDistance(float scaleFactor) const
 {
-    return ColorDistance(scaleFactor * m_redDiff, scaleFactor * m_greenDiff, scaleFactor * m_blueDiff);
+    return ColorDistance(static_cast<int>(scaleFactor * m_redDiff),
+                         static_cast<int>(scaleFactor * m_greenDiff),
+                         static_cast<int>(scaleFactor * m_blueDiff));
 }
 
 Color ColorDistance::addColorsAndClamp(const Color& first, const Color& second)