(svn r13169) -Codechange: remove a (now) unneeded parameter of one of the Window constructors.
--- a/src/main_gui.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/main_gui.cpp Sun May 18 20:40:30 2008 +0000
@@ -217,7 +217,7 @@
struct MainWindow : Window
{
- MainWindow(int width, int height) : Window(0, 0, width, height, NULL, WC_MAIN_WINDOW, NULL)
+ MainWindow(int width, int height) : Window(0, 0, width, height, WC_MAIN_WINDOW, NULL)
{
InitializeWindowViewport(this, 0, 0, width, height, TileXY(32, 32), ZOOM_LVL_VIEWPORT);
}
--- a/src/misc_gui.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/misc_gui.cpp Sun May 18 20:40:30 2008 +0000
@@ -352,7 +352,7 @@
public:
ErrmsgWindow(Point pt, int width, int height, StringID msg1, StringID msg2, const Widget *widget, bool show_player_face) :
- Window(pt.x, pt.y, width, height, NULL, WC_ERRMSG, widget),
+ Window(pt.x, pt.y, width, height, WC_ERRMSG, widget),
show_player_face(show_player_face)
{
this->duration = _patches.errmsg_duration;
@@ -532,7 +532,7 @@
TooltipsWindow(int x, int y, int width, int height, const Widget *widget,
StringID str, uint paramcount, const uint64 params[]) :
- Window(x, y, width, height, NULL, WC_TOOLTIPS, widget)
+ Window(x, y, width, height, WC_TOOLTIPS, widget)
{
this->string_id = str;
assert(sizeof(this->params[0]) == sizeof(params[0]));
--- a/src/network/network_gui.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/network/network_gui.cpp Sun May 18 20:40:30 2008 +0000
@@ -1321,7 +1321,7 @@
ClientList_Action_Proc *proc[MAX_CLIENTLIST_ACTION];
NetworkClientListPopupWindow(int x, int y, const Widget *widgets, int client_no) :
- Window(x, y, 150, 100, NULL, WC_TOOLBAR_MENU, widgets),
+ Window(x, y, 150, 100, WC_TOOLBAR_MENU, widgets),
sel_index(0), client_no(client_no)
{
/*
--- a/src/toolbar_gui.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/toolbar_gui.cpp Sun May 18 20:40:30 2008 +0000
@@ -1125,7 +1125,7 @@
ToolbarMenuWindow(int x, int y, int width, int height, const Widget *widgets, int item_count,
int sel_index, int parent_button, StringID base_string, int checked_items,
int disabled_mask) :
- Window(x, y, width, height, NULL, WC_TOOLBAR_MENU, widgets),
+ Window(x, y, width, height, WC_TOOLBAR_MENU, widgets),
item_count(item_count), sel_index(sel_index), main_button(GB(parent_button, 0, 8)),
action_id((GB(parent_button, 8, 8) != 0) ? GB(parent_button, 8, 8) : parent_button),
checked_items(checked_items), disabled_items(disabled_items), base_string(base_string)
@@ -1280,7 +1280,7 @@
int gray_items;
ToolbarPlayerMenuWindow(int x, int y, int width, int height, const Widget *widgets, int main_button, int gray) :
- Window(x, y, width, height, NULL, WC_TOOLBAR_MENU, widgets),
+ Window(x, y, width, height, WC_TOOLBAR_MENU, widgets),
item_count(0), main_button(main_button), action_id(main_button), gray_items(gray)
{
this->flags4 &= ~WF_WHITE_BORDER_MASK;
--- a/src/widgets/dropdown.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/widgets/dropdown.cpp Sun May 18 20:40:30 2008 +0000
@@ -72,7 +72,7 @@
bool drag_mode;
int scrolling;
- DropdownWindow(int x, int y, int width, int height, const Widget *widget) : Window(x, y, width, height, NULL, WC_DROPDOWN_MENU, widget)
+ DropdownWindow(int x, int y, int width, int height, const Widget *widget) : Window(x, y, width, height, WC_DROPDOWN_MENU, widget)
{
}
--- a/src/window.cpp Sun May 18 20:01:54 2008 +0000
+++ b/src/window.cpp Sun May 18 20:40:30 2008 +0000
@@ -963,16 +963,13 @@
* @param y offset in pixels from the top of the screen
* @param width width in pixels of the window
* @param height height in pixels of the window
- * @param *proc see WindowProc function to call when any messages/updates happen to the window
* @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
* @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)
+Window::Window(int x, int y, int width, int height, WindowClass cls, const Widget *widget)
{
- this->Initialize(x, y, width, height, proc, cls, widget, 0);
-
- if (proc != NULL) this->FindWindowPlacementAndResize(width, height);
+ this->Initialize(x, y, width, height, NULL, cls, widget, 0);
}
--- a/src/window_gui.h Sun May 18 20:01:54 2008 +0000
+++ b/src/window_gui.h Sun May 18 20:40:30 2008 +0000
@@ -282,7 +282,7 @@
void FindWindowPlacementAndResize(const WindowDesc *desc);
public:
- Window(int x, int y, int width, int height, WindowProc *proc, WindowClass cls, const Widget *widget);
+ Window(int x, int y, int width, int height, WindowClass cls, const Widget *widget);
Window(const WindowDesc *desc, WindowNumber number = 0);
virtual ~Window();