eeze/sensor/tizen: USe enum sentinel to iterate over sensor types.
With the newer version we now have a sentinel that marks the last item of the enum.
This commit is contained in:
parent
815d452303
commit
f5b322a824
|
@ -769,8 +769,7 @@ eeze_sensor_tizen_sensors_find(void)
|
|||
sensor_type_e type;
|
||||
bool supported = 0;
|
||||
|
||||
/* FIXME: Make this safe against changes in the enum. But how? */
|
||||
for (type = SENSOR_ACCELEROMETER; type <= SENSOR_MOTION_FACEDOWN; type++)
|
||||
for (type = SENSOR_ACCELEROMETER; type <= SENSOR_LAST; type++)
|
||||
{
|
||||
sensor_is_supported(type, &supported);
|
||||
if (supported)
|
||||
|
|
Loading…
Reference in New Issue