Bug 819766 - Fix operator< ambiguity. r=smaug
authorMats Palmgren <matspal@gmail.com>
Sun, 09 Dec 2012 19:28:49 +0100
changeset 115447 bd3f5cf45700feb96485f3faf5ad8737eb2e8b62
parent 115446 c8ecb984c5425986255118e8610eb90cd567be17
child 115448 7a62a67b04019dab934c0e9685a82509e646cc20
push id24008
push userryanvm@gmail.com
push dateMon, 10 Dec 2012 18:56:37 +0000
treeherdermozilla-central@00e26dece6ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs819766
milestone20.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 819766 - Fix operator< ambiguity. r=smaug
content/events/src/nsEventStateManager.cpp
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -5453,28 +5453,28 @@ nsEventStateManager::WheelPrefs::Init(
   nsAutoCString prefNameZ(basePrefName);
   prefNameZ.AppendLiteral("delta_multiplier_z");
   mMultiplierZ[aIndex] =
     static_cast<double>(Preferences::GetInt(prefNameZ.get(), 100)) / 100;
 
   nsAutoCString prefNameAction(basePrefName);
   prefNameAction.AppendLiteral("action");
   int32_t action = Preferences::GetInt(prefNameAction.get(), ACTION_SCROLL);
-  if (action < ACTION_NONE || action > ACTION_LAST) {
+  if (action < int32_t(ACTION_NONE) || action > int32_t(ACTION_LAST)) {
     NS_WARNING("Unsupported action pref value, replaced with 'Scroll'.");
     action = ACTION_SCROLL;
   }
   mActions[aIndex] = static_cast<Action>(action);
 
   // Compute action values overridden by .override_x pref.
   // At present, override is possible only for the x-direction
   // because this pref is introduced mainly for tilt wheels.
   prefNameAction.AppendLiteral(".override_x");
   int32_t actionOverrideX = Preferences::GetInt(prefNameAction.get(), -1);
-  if (actionOverrideX < -1 || actionOverrideX > ACTION_LAST) {
+  if (actionOverrideX < -1 || actionOverrideX > int32_t(ACTION_LAST)) {
     NS_WARNING("Unsupported action override pref value, didn't override.");
     actionOverrideX = -1;
   }
   mOverriddenActionsX[aIndex] = (actionOverrideX == -1)
                               ? static_cast<Action>(action)
                               : static_cast<Action>(actionOverrideX);
 }