Changeset 94823 in webkit


Ignore:
Timestamp:
Sep 8, 2011 5:50:09 PM (13 years ago)
Author:
tony@chromium.org
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r94822 r94823  
     12011-09-08  Tony Chang  <tony@chromium.org>
     2
     3        Cleanup of switch statements with default cases
     4        https://bugs.webkit.org/show_bug.cgi?id=67808
     5
     6        Reviewed by Adam Barth.
     7
     8        No new tests, just a small refactoring.
     9
     10        * page/WebKitAnimation.cpp:
     11        (WebCore::WebKitAnimation::fillMode):
     12        * platform/audio/Distance.cpp:
     13        (WebCore::DistanceEffect::gain):
     14
    1152011-09-08  Eric Seidel  <eric@webkit.org>
    216
  • trunk/Source/WebCore/page/WebKitAnimation.cpp

    r80846 r94823  
    9595    case AnimationFillModeNone:
    9696        return FILL_NONE;
    97         break;
    9897    case AnimationFillModeForwards:
    9998        return FILL_FORWARDS;
    100         break;
    10199    case AnimationFillModeBackwards:
    102100        return FILL_BACKWARDS;
    103         break;
    104     default:
     101    case AnimationFillModeBoth:
    105102        return FILL_BOTH;
    106         break;
    107103    }
     104    ASSERT_NOT_REACHED();
     105    return FILL_BOTH;
    108106}
    109107
  • trunk/Source/WebCore/platform/audio/Distance.cpp

    r66745 r94823  
    6161    case ModelLinear:
    6262        return linearGain(distance);
    63         break;
    6463    case ModelInverse:
    6564        return inverseGain(distance);
    66         break;
    6765    case ModelExponential:
    6866        return exponentialGain(distance);
    69         break;
    70 
    71     default:
    72         return 0.0;
    7367    }
     68    ASSERT_NOT_REACHED();
     69    return 0.0;
    7470}
    7571
Note: See TracChangeset for help on using the changeset viewer.