From ca0a012ecb32d13ec73a9c0e1fe20bd738588e41 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 31 Oct 2016 16:17:39 +0800 Subject: [PATCH] Remove window_exists - can get back from an earlier commit if needed --- common/arch/sdl/window.cpp | 14 -------------- common/include/fwd-window.h | 1 - common/include/window.h | 1 - 3 files changed, 16 deletions(-) diff --git a/common/arch/sdl/window.cpp b/common/arch/sdl/window.cpp index 1fb7142e3..c6351c04f 100644 --- a/common/arch/sdl/window.cpp +++ b/common/arch/sdl/window.cpp @@ -100,20 +100,6 @@ int window_close(window *wind) return 1; } -#if 0 -// This function is problematic in that another window could open with the same pointer value, -// causing a false positive to be returned. -// Could use w_exists, but that would mean filling it out with some bool stored elsewhere for every window (yuck) -int window_exists(window *wind) -{ - window *w; - - for (w = FirstWindow; w && w != wind; w = w->next) {} - - return w && w == wind; -} -#endif - // Get the top window that's visible window *window_get_front(void) { diff --git a/common/include/fwd-window.h b/common/include/fwd-window.h index 1ad04acf9..34312789e 100644 --- a/common/include/fwd-window.h +++ b/common/include/fwd-window.h @@ -33,7 +33,6 @@ class unused_window_userdata_t; */ int window_close(window *wind); -//int window_exists(window *wind); window *window_get_front(); window *window_get_first(); window *window_get_next(window &wind); diff --git a/common/include/window.h b/common/include/window.h index 8852f6dc6..c65ec4c41 100644 --- a/common/include/window.h +++ b/common/include/window.h @@ -74,7 +74,6 @@ public: friend window *window_create(grs_canvas &src, int x, int y, int w, int h, window_subfunction event_callback, void *userdata, const void *createdata); friend int window_close(window *wind); - //friend int window_exists(window *wind); friend window *window_get_front(); friend window *window_get_first(); friend void window_select(window &wind);