From c7a78807e61fcc9b8403e3a0bcc1536b164093eb Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Thu, 8 Mar 2018 12:47:13 +0100 Subject: [PATCH] Remove unused function tile_element_check_address() --- src/openrct2/world/Map.cpp | 17 ----------------- src/openrct2/world/Map.h | 1 - 2 files changed, 18 deletions(-) diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index c43e33373b..ec8c082fcb 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -3167,23 +3167,6 @@ rct_tile_element *tile_element_insert(sint32 x, sint32 y, sint32 z, sint32 flags return insertedElement; } -/** - * This function will validate element address. It will only check if element lies within - * the user-accessible part of map elements, there is some scratch space behind that is not - * considered valid here. - */ -bool tile_element_check_address(const rct_tile_element * const element) -{ - if (element >= gTileElements - && element < gTileElements + MAX_TILE_ELEMENTS - // condition below checks alignment - && gTileElements + (((uintptr_t)element - (uintptr_t)gTileElements) / sizeof(rct_tile_element)) == element) - { - return true; - } - return false; -} - /** * * rct2: 0x0068BB18 diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index 0e941b468c..8005a6c6c3 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -459,7 +459,6 @@ void map_invalidate_selection_rect(); void map_reorganise_elements(); bool map_check_free_elements_and_reorganise(sint32 num_elements); rct_tile_element *tile_element_insert(sint32 x, sint32 y, sint32 z, sint32 flags); -bool tile_element_check_address(const rct_tile_element * const element); using CLEAR_FUNC = sint32(*)(rct_tile_element** tile_element, sint32 x, sint32 y, uint8 flags, money32* price);