(svn r13169) -Codechange: remove a (now) unneeded parameter of one of the Window constructors.

This commit is contained in:
rubidium 2008-05-18 20:40:30 +00:00
parent 9aa69db2e6
commit 6da56ee87e
7 changed files with 10 additions and 13 deletions

View File

@ -217,7 +217,7 @@ extern void UpdateAllStationVirtCoord();
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);
}

View File

@ -352,7 +352,7 @@ private:
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 @@ struct TooltipsWindow : public Window
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]));

View File

@ -1321,7 +1321,7 @@ struct NetworkClientListPopupWindow : Window {
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)
{
/*

View File

@ -1125,7 +1125,7 @@ struct ToolbarMenuWindow : Window {
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 @@ struct ToolbarPlayerMenuWindow : Window {
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;

View File

@ -72,7 +72,7 @@ struct DropdownWindow : Window {
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)
{
}

View File

@ -963,16 +963,13 @@ void Window::FindWindowPlacementAndResize(const WindowDesc *desc)
* @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);
}

View File

@ -282,7 +282,7 @@ protected:
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();