Bug 1275475 - Fix -Wlogical-op warning in dom/animation/ComputedTimingFunction.cpp. r=daisuke
authorChris Peterson <cpeterson@mozilla.com>
Sun, 22 May 2016 21:02:12 -0700
changeset 340147 4c23a043fc70f179c0aae0077820f369f475d980
parent 340146 5f821afd7299cea7f16730153a1d1b798d8d5165
child 340148 e9de9eee6be361530f7d5b1d1e2bc0be1d608cfe
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaisuke
bugs1275475
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275475 - Fix -Wlogical-op warning in dom/animation/ComputedTimingFunction.cpp. r=daisuke dom/animation/ComputedTimingFunction.cpp:33:114 [-Wlogical-op] logical 'or' of collectively exhaustive tests is always true
dom/animation/ComputedTimingFunction.cpp
--- a/dom/animation/ComputedTimingFunction.cpp
+++ b/dom/animation/ComputedTimingFunction.cpp
@@ -25,18 +25,18 @@ ComputedTimingFunction::Init(const nsTim
 
 static inline double
 StepTiming(uint32_t aSteps,
            double aPortion,
            ComputedTimingFunction::BeforeFlag aBeforeFlag,
            nsTimingFunction::Type aType)
 {
   MOZ_ASSERT(0.0 <= aPortion && aPortion <= 1.0, "out of range");
-  MOZ_ASSERT(aType != nsTimingFunction::Type::StepStart ||
-             aType != nsTimingFunction::Type::StepEnd, "invalid type");
+  MOZ_ASSERT(aType == nsTimingFunction::Type::StepStart ||
+             aType == nsTimingFunction::Type::StepEnd, "invalid type");
 
   if (aPortion == 1.0) {
     return 1.0;
   }
 
   // Calculate current step using step-end behavior
   uint32_t step = uint32_t(aPortion * aSteps); // floor