summaryrefslogtreecommitdiffstats
path: root/hal/sandbox/SandboxHal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hal/sandbox/SandboxHal.cpp')
-rw-r--r--hal/sandbox/SandboxHal.cpp6
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);