diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 14:24:50 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 14:24:50 +0200 |
commit | a95078a6c6c8ed253c5e279c71462d0d45c1aec3 (patch) | |
tree | e18cb3acf71dfb2bf8a038c274eccfd6b9070ae0 /hal/sandbox/SandboxHal.cpp | |
parent | 6195a2f1e2f5d693effe172ad1012b3c2eeac777 (diff) | |
download | UXP-a95078a6c6c8ed253c5e279c71462d0d45c1aec3.tar UXP-a95078a6c6c8ed253c5e279c71462d0d45c1aec3.tar.gz UXP-a95078a6c6c8ed253c5e279c71462d0d45c1aec3.tar.lz UXP-a95078a6c6c8ed253c5e279c71462d0d45c1aec3.tar.xz UXP-a95078a6c6c8ed253c5e279c71462d0d45c1aec3.zip |
Bug 1469309 - Remove an unused sensor type.
Diffstat (limited to 'hal/sandbox/SandboxHal.cpp')
-rw-r--r-- | hal/sandbox/SandboxHal.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index 9771b3ef6..5501d459b 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -16,6 +16,7 @@ #include "mozilla/dom/battery/Types.h" #include "mozilla/dom/network/Types.h" #include "mozilla/dom/ScreenOrientation.h" +#include "mozilla/EnumeratedRange.h" #include "mozilla/Observer.h" #include "mozilla/Unused.h" #include "nsAutoPtr.h" @@ -404,9 +405,8 @@ public: hal::UnregisterBatteryObserver(this); hal::UnregisterNetworkObserver(this); hal::UnregisterScreenConfigurationObserver(this); - for (int32_t sensor = SENSOR_UNKNOWN + 1; - sensor < NUM_SENSOR_TYPE; ++sensor) { - hal::UnregisterSensorObserver(SensorType(sensor), this); + for (auto sensor : MakeEnumeratedRange(NUM_SENSOR_TYPE)) { + hal::UnregisterSensorObserver(sensor, this); } hal::UnregisterWakeLockObserver(this); hal::UnregisterSystemClockChangeObserver(this); |