Reviewed by Adam Roben.
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2008 23:01:37 +0000 (23:01 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Aug 2008 23:01:37 +0000 (23:01 +0000)
        Fix warning seen in MSVC converting ints to floats.

        * rendering/Length.h:
        (WebCore::Length::calcFloatValue):

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

WebCore/ChangeLog
WebCore/rendering/Length.h

index 61de54a..ed4101c 100644 (file)
 
 2008-08-04  Eric Seidel  <eric@webkit.org>
 
+        Reviewed by Adam Roben.
+
+        Fix warning seen in MSVC converting ints to floats.
+
+        * rendering/Length.h:
+        (WebCore::Length::calcFloatValue):
+
+2008-08-04  Eric Seidel  <eric@webkit.org>
+
         Reviewed by hyatt.
 
         Clean up Gradient constructors, make sure all members are initialized.
index d2d85ae..93119cd 100644 (file)
@@ -139,13 +139,13 @@ namespace WebCore {
         {
             switch (type()) {
                 case Fixed:
-                    return value();
+                    return static_cast<float>(value());
                 case Percent:
                     return static_cast<float>(maxValue * percent() / 100.0);
                 case Auto:
-                    return maxValue;
+                    return static_cast<float>(maxValue);
                 default:
-                    return undefinedLength;
+                    return static_cast<float>(undefinedLength);
             }
         }