Title: [94823] trunk/Source/WebCore
Revision
94823
Author
t...@chromium.org
Date
2011-09-08 17:50:09 -0700 (Thu, 08 Sep 2011)

Log Message

Cleanup of switch statements with default cases
https://bugs.webkit.org/show_bug.cgi?id=67808

Reviewed by Adam Barth.

No new tests, just a small refactoring.

* page/WebKitAnimation.cpp:
(WebCore::WebKitAnimation::fillMode):
* platform/audio/Distance.cpp:
(WebCore::DistanceEffect::gain):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94822 => 94823)


--- trunk/Source/WebCore/ChangeLog	2011-09-09 00:34:59 UTC (rev 94822)
+++ trunk/Source/WebCore/ChangeLog	2011-09-09 00:50:09 UTC (rev 94823)
@@ -1,3 +1,17 @@
+2011-09-08  Tony Chang  <t...@chromium.org>
+
+        Cleanup of switch statements with default cases
+        https://bugs.webkit.org/show_bug.cgi?id=67808
+
+        Reviewed by Adam Barth.
+
+        No new tests, just a small refactoring.
+
+        * page/WebKitAnimation.cpp:
+        (WebCore::WebKitAnimation::fillMode):
+        * platform/audio/Distance.cpp:
+        (WebCore::DistanceEffect::gain):
+
 2011-09-08  Eric Seidel  <e...@webkit.org>
 
         [BiDi] Add support for the BDI element

Modified: trunk/Source/WebCore/page/WebKitAnimation.cpp (94822 => 94823)


--- trunk/Source/WebCore/page/WebKitAnimation.cpp	2011-09-09 00:34:59 UTC (rev 94822)
+++ trunk/Source/WebCore/page/WebKitAnimation.cpp	2011-09-09 00:50:09 UTC (rev 94823)
@@ -94,17 +94,15 @@
     switch (m_keyframeAnimation->animation()->fillMode()) {
     case AnimationFillModeNone:
         return FILL_NONE;
-        break;
     case AnimationFillModeForwards:
         return FILL_FORWARDS;
-        break;
     case AnimationFillModeBackwards:
         return FILL_BACKWARDS;
-        break;
-    default:
+    case AnimationFillModeBoth:
         return FILL_BOTH;
-        break;
     }
+    ASSERT_NOT_REACHED();
+    return FILL_BOTH;
 }
 
 void WebKitAnimation::pause()

Modified: trunk/Source/WebCore/platform/audio/Distance.cpp (94822 => 94823)


--- trunk/Source/WebCore/platform/audio/Distance.cpp	2011-09-09 00:34:59 UTC (rev 94822)
+++ trunk/Source/WebCore/platform/audio/Distance.cpp	2011-09-09 00:50:09 UTC (rev 94823)
@@ -60,17 +60,13 @@
     switch (m_model) {
     case ModelLinear:
         return linearGain(distance);
-        break;
     case ModelInverse:
         return inverseGain(distance);
-        break;
     case ModelExponential:
         return exponentialGain(distance);
-        break;
-
-    default:
-        return 0.0;
     }
+    ASSERT_NOT_REACHED();
+    return 0.0;
 }
 
 double DistanceEffect::linearGain(double distance)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to