WebCore:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jan 2007 03:51:18 +0000 (03:51 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Jan 2007 03:51:18 +0000 (03:51 +0000)
        Reviewed by Eric.

        Release build fix.

        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast): Added static cast
        to unsigned when calculating flooredValueIndex.

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

WebCore/ChangeLog
WebCore/ksvg2/svg/SVGAnimationElement.cpp

index 9608cccc96bc2584e37bc739c579ef93ac185e6d..c746e89c02ddac0fc650253e9067ff06143c8958 100644 (file)
@@ -1,3 +1,13 @@
+2007-01-26  David Kilzer  <ddkilzer@webkit.org>
+
+        Reviewed by Eric.
+
+        Release build fix.
+
+        * ksvg2/svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::calculateValueIndexAndPercentagePast): Added static cast
+        to unsigned when calculating flooredValueIndex.
+
 2007-01-26  Darin Adler  <darin@apple.com>
 
         - checked in slightly newer revision of the patch below
index bdc21cab26ee2c3231bf19cb7fa5423789151a19..d46ba1a7b00560aa84a84a1f8fbc23056ca4483f 100644 (file)
@@ -670,7 +670,7 @@ void SVGAnimationElement::calculateValueIndexAndPercentagePast(float timePercent
         caculateValueIndexForKeyTimes(timePercentage, m_keyTimes, valueIndex, lastKeyTimePercentage, nextKeyTimePercentage);
     else {
         unsigned lastPossibleIndex = (m_values.size() ? m_values.size() - 1: 1);
-        unsigned flooredValueIndex = timePercentage * lastPossibleIndex;
+        unsigned flooredValueIndex = static_cast<unsigned>(timePercentage * lastPossibleIndex);
         valueIndex = flooredValueIndex;
         lastKeyTimePercentage = flooredValueIndex / (float)lastPossibleIndex;
         nextKeyTimePercentage = (flooredValueIndex + 1) / (float)lastPossibleIndex;