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:
Stefan Schmidt 2013-04-03 16:23:33 +01:00
parent 815d452303
commit f5b322a824
1 changed files with 1 additions and 2 deletions

View File

@ -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)