mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
fix warnings
This commit is contained in:
@@ -1778,7 +1778,7 @@ void tool_cancel()
|
||||
// Reset map selection
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) = 0;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) >= 0) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) != 0xFFFF) {
|
||||
// Invalidate tool widget
|
||||
widget_invalidate_by_number(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass),
|
||||
|
||||
@@ -1547,11 +1547,10 @@ static uint16 map_window_get_pixel_colour_peep(int x, int y)
|
||||
if (!(mapElement->properties.surface.ownership & OWNERSHIP_OWNED))
|
||||
colour = 10 | (colour & 0xFF00);
|
||||
|
||||
const size_t count = countof(ElementTypeAddColour);
|
||||
const int maxSupportedMapElementType = (int)countof(ElementTypeAddColour);
|
||||
while (!map_element_is_last_for_tile(mapElement++)) {
|
||||
int mapElementType = map_element_get_type(mapElement) >> 2;
|
||||
if (mapElementType >= count)
|
||||
{
|
||||
if (mapElementType >= maxSupportedMapElementType) {
|
||||
mapElementType = MAP_ELEMENT_TYPE_CORRUPT >> 2;
|
||||
}
|
||||
colour &= ElementTypeMaskColour[mapElementType];
|
||||
|
||||
Reference in New Issue
Block a user