From 24d78af91541cca3bd881889548e703e19554e13 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Sun, 6 Dec 2009 09:56:46 +0000 Subject: [PATCH] Removed unused function display::rectangle_need_update. --- src/display.cpp | 20 -------------------- src/display.hpp | 3 --- 2 files changed, 23 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index bc73258ffa9..ab3dbadec25 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -2334,26 +2334,6 @@ bool display::invalidate_locations_in_rect(const SDL_Rect& rect) return result; } -bool display::rectangle_need_update(const SDL_Rect& rect) const -{ - SDL_Rect visible_rect = intersect_rects(map_area(), rect); - - // check if rectangle is visible - if(visible_rect.w <=0 || visible_rect.h <=0) - return false; - - // invalidateAll_ is about visible hexes, so only check if visible - if(invalidateAll_) - return true; - - foreach (const map_location &loc, hexes_under_rect(visible_rect)) { - if (invalidated_.find(loc) != invalidated_.end()) - return true; - } - - return false; -} - void display::invalidate_animations() { if (!preferences::animate_map()) { diff --git a/src/display.hpp b/src/display.hpp index 17622ab09a3..36b4d3ac2b2 100644 --- a/src/display.hpp +++ b/src/display.hpp @@ -285,9 +285,6 @@ public: bool invalidate_locations_in_rect(const SDL_Rect& rect); bool invalidate_visible_locations_in_rect(const SDL_Rect& rect); - /** check if visible hexes under the rectangle is invalidated */ - bool rectangle_need_update(const SDL_Rect& rect) const; - /** * Function to invalidate animated terrains which may have changed. */