diff options
author | rubidium <rubidium@openttd.org> | 2008-05-13 14:43:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-13 14:43:33 +0000 |
commit | a7db265bb6c55bb3e507ab2b069cedbe4a198b03 (patch) | |
tree | 07ccf25e54bf3e9762d7fd6e9e3b30a6138e95f6 /src/window.cpp | |
parent | c6c908aba56dcd961c8ab35032f851d8c6948883 (diff) | |
download | openttd-a7db265bb6c55bb3e507ab2b069cedbe4a198b03.tar.xz |
(svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/window.cpp b/src/window.cpp index 4c7f89454..09320a003 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -891,10 +891,10 @@ static void AssignWidgetToWindow(Window *w, const Widget *widget) * @param cls see WindowClass class of the window, used for identification and grouping * @param *widget see Widget pointer to the window layout and various elements * @param window_number number being assigned to the new window - * @param data the data to be given during the WE_CREATE message - * @return Window pointer of the newly created window */ + * @return Window pointer of the newly created window + */ void Window::Initialize(int x, int y, int min_width, int min_height, - WindowProc *proc, WindowClass cls, const Widget *widget, int window_number, void *data) + WindowProc *proc, WindowClass cls, const Widget *widget, int window_number) { /* We have run out of windows, close one and use that as the place for our new one */ if (_last_z_window == endof(_z_windows)) { @@ -943,7 +943,6 @@ void Window::Initialize(int x, int y, int min_width, int min_height, WindowEvent e; e.event = WE_CREATE; - e.we.create.data = data; this->HandleWindowEvent(&e); } @@ -1025,9 +1024,9 @@ void Window::FindWindowPlacementAndResize(const WindowDesc *desc) * @param *widget see Widget pointer to the window layout and various elements * @return Window pointer of the newly created window */ -Window::Window(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const Widget *widget, void *data) +Window::Window(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const Widget *widget) { - this->Initialize(x, y, width, height, proc, cls, widget, 0, data); + this->Initialize(x, y, width, height, proc, cls, widget, 0); if (proc != NULL) this->FindWindowPlacementAndResize(width, height); } @@ -1215,14 +1214,13 @@ static Point LocalGetWindowPlacement(const WindowDesc *desc, int window_number) * * @param *desc The pointer to the WindowDesc to be created * @param window_number the window number of the new window - * @param data arbitrary data that is send with the WE_CREATE message * * @return Window pointer of the newly created window */ -Window::Window(const WindowDesc *desc, void *data, WindowNumber window_number) +Window::Window(const WindowDesc *desc, WindowNumber window_number) { Point pt = LocalGetWindowPlacement(desc, window_number); - this->Initialize(pt.x, pt.y, desc->minimum_width, desc->minimum_height, desc->proc, desc->cls, desc->widgets, window_number, data); + this->Initialize(pt.x, pt.y, desc->minimum_width, desc->minimum_height, desc->proc, desc->cls, desc->widgets, window_number); this->desc_flags = desc->flags; if (desc->proc != NULL) this->FindWindowPlacementAndResize(desc->default_width, desc->default_height); |