1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix cast to bool in map element functions

This commit is contained in:
Michael Steenbeek
2017-08-01 13:42:50 +02:00
committed by GitHub
parent ee443818a8
commit 2f3a30f22b
3 changed files with 5 additions and 5 deletions

View File

@@ -164,7 +164,7 @@ void map_element_set_track_sequence(rct_map_element * mapElement, int trackSeque
bool map_element_get_green_light(const rct_map_element * mapElement)
{
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT;
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0;
}
void map_element_set_green_light(rct_map_element * mapElement, bool greenLight)
@@ -188,7 +188,7 @@ void map_element_set_brake_booster_speed(rct_map_element *mapElement, int speed)
bool map_element_is_taking_photo(const rct_map_element * mapElement)
{
return (bool)mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK;
return (mapElement->properties.track.sequence & MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK) != 0;
}
void map_element_set_onride_photo_timeout(rct_map_element * mapElement)