diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-15 22:21:45 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-15 22:25:38 +0100 |
commit | e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3 (patch) | |
tree | b07ce915d1e5d4cdd83cf4ab858c69d782ab0fe0 /src/gui | |
parent | 08c9cde4726f94698ea938d464cd1de95b7be587 (diff) | |
download | mana-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.gz mana-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.bz2 mana-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.xz mana-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.zip |
Removed unnecessary parenthesis at constructors
When not passing any parameters to constructors, there is no reason for
using parenthesis.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/char_server.cpp | 2 | ||||
-rw-r--r-- | src/gui/chat.cpp | 2 | ||||
-rw-r--r-- | src/gui/confirm_dialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/emotewindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/gui.cpp | 4 | ||||
-rw-r--r-- | src/gui/help.cpp | 2 | ||||
-rw-r--r-- | src/gui/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/itemcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/itempopup.cpp | 6 | ||||
-rw-r--r-- | src/gui/itemshortcutcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/login.cpp | 2 | ||||
-rw-r--r-- | src/gui/npcintegerdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/ok_dialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/sell.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup_colors.cpp | 8 | ||||
-rw-r--r-- | src/gui/setup_keyboard.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup_players.cpp | 10 | ||||
-rw-r--r-- | src/gui/skill.cpp | 2 | ||||
-rw-r--r-- | src/gui/speechbubble.cpp | 2 | ||||
-rw-r--r-- | src/gui/updatewindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/window.cpp | 4 |
26 files changed, 37 insertions, 37 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp index bc096379..8e7b0dbc 100644 --- a/src/gui/char_server.cpp +++ b/src/gui/char_server.cpp @@ -50,7 +50,7 @@ ServerSelectDialog::ServerSelectDialog(LoginData *loginData, int nextState): mLoginData(loginData), mNextState(nextState) { - mServerListModel = new ServerListModel(); + mServerListModel = new ServerListModel; mServerList = new ListBox(mServerListModel); ScrollArea *mScrollArea = new ScrollArea(mServerList); mOkButton = new Button(_("OK"), "ok", this); diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 21e4f106..19d386cf 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -59,7 +59,7 @@ Window(""), mNetwork(network), mTmpVisible(false) setMinWidth(150); setMinHeight(90); - mItemLinkHandler = new ItemLinkHandler(); + mItemLinkHandler = new ItemLinkHandler; mChatInput = new ChatInput; mChatInput->setActionEventId("chatinput"); diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp index 38697f3a..5ad2e26c 100644 --- a/src/gui/confirm_dialog.cpp +++ b/src/gui/confirm_dialog.cpp @@ -32,7 +32,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg, Window *parent): Window(title, true, parent) { - mTextBox = new TextBox(); + mTextBox = new TextBox; mTextBox->setEditable(false); mTextBox->setOpaque(false); diff --git a/src/gui/emotewindow.cpp b/src/gui/emotewindow.cpp index f4a8999a..30ee3cd3 100644 --- a/src/gui/emotewindow.cpp +++ b/src/gui/emotewindow.cpp @@ -44,7 +44,7 @@ EmoteWindow::EmoteWindow(): mUseButton = new Button(_("Use"), "use", this); - mEmotes = new EmoteContainer(); + mEmotes = new EmoteContainer; mEmotes->addSelectionListener(this); mEmoteScroll = new ScrollArea(mEmotes); diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index a2be6b00..6d3a0b4c 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -61,7 +61,7 @@ EquipmentWindow::EquipmentWindow(): Window(_("Equipment")), mSelected(-1) { - mItemPopup = new ItemPopup(); + mItemPopup = new ItemPopup; // Control that shows the Player mPlayerBox = new PlayerBox; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index a7946993..9b9e74f4 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -97,7 +97,7 @@ Gui::Gui(Graphics *graphics): mFocusHandler = new FocusHandler; // Initialize top GUI widget - WindowContainer *guiTop = new WindowContainer(); + WindowContainer *guiTop = new WindowContainer; guiTop->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(), graphics->getHeight())); guiTop->setOpaque(false); @@ -156,7 +156,7 @@ Gui::Gui(Graphics *graphics): config.addListener("customcursor", mConfigListener); // Create the viewport - viewport = new Viewport(); + viewport = new Viewport; viewport->setDimension(gcn::Rectangle(0, 0, graphics->getWidth(), graphics->getHeight())); guiTop->add(viewport); diff --git a/src/gui/help.cpp b/src/gui/help.cpp index ece2dce4..c7f95001 100644 --- a/src/gui/help.cpp +++ b/src/gui/help.cpp @@ -39,7 +39,7 @@ HelpWindow::HelpWindow(): setWindowName(_("Help")); setResizable(true); - mBrowserBox = new BrowserBox(); + mBrowserBox = new BrowserBox; mBrowserBox->setOpaque(false); mScrollArea = new ScrollArea(mBrowserBox); Button *okButton = new Button(_("Close"), "close", this); diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 6debf473..4f3ef6b3 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -99,7 +99,7 @@ InventoryWindow::InventoryWindow(int invSize): place(6, 5, mUseButton); Layout &layout = getLayout(); - layout.setRowHeight(0, mDropButton->getHeight()); + layout.setRowHeight(0, mDropButton->getHeight()); loadWindowState(); setLocationRelativeTo(getParent()); diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 0beb5cfb..2894ca26 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -51,7 +51,7 @@ ItemContainer::ItemContainer(Inventory *inventory, int offset): mLastSelectedItemId(NO_ITEM), mOffset(offset) { - mItemPopup = new ItemPopup(); + mItemPopup = new ItemPopup; ResourceManager *resman = ResourceManager::getInstance(); diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index ee28435b..9e7cb8a9 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -52,7 +52,7 @@ ItemPopup::ItemPopup(): mItemName->setPosition(2, 2); // Item Description - mItemDesc = new TextBox(); + mItemDesc = new TextBox; mItemDesc->setEditable(false); mItemDescScroll = new ScrollArea(mItemDesc); @@ -63,7 +63,7 @@ ItemPopup::ItemPopup(): mItemDescScroll->setPosition(2, getFont()->getHeight()); // Item Effect - mItemEffect = new TextBox(); + mItemEffect = new TextBox; mItemEffect->setEditable(false); mItemEffectScroll = new ScrollArea(mItemEffect); @@ -74,7 +74,7 @@ ItemPopup::ItemPopup(): mItemEffectScroll->setPosition(2, (2 * getFont()->getHeight()) + 5); // Item Weight - mItemWeight = new TextBox(); + mItemWeight = new TextBox; mItemWeight->setEditable(false); mItemWeightScroll = new ScrollArea(mItemWeight); diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index 42e3b853..9d1b6375 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -45,7 +45,7 @@ ItemShortcutContainer::ItemShortcutContainer(): addMouseListener(this); addWidgetListener(this); - mItemPopup = new ItemPopup(); + mItemPopup = new ItemPopup; ResourceManager *resman = ResourceManager::getInstance(); diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 90ceab1a..9c109687 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -60,7 +60,7 @@ LoginDialog::LoginDialog(LoginData *loginData): mServerList = new DropDownList("MostRecent00", dfltServer, dfltPort, MAX_SERVER_LIST_SIZE); mServerListBox = new ListBox(mServerList); - mServerScrollArea = new ScrollArea(); + mServerScrollArea = new ScrollArea; mUserField = new TextField(mLoginData->username); mPassField = new PasswordField(mLoginData->password); diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp index 540eca88..7e888d16 100644 --- a/src/gui/npcintegerdialog.cpp +++ b/src/gui/npcintegerdialog.cpp @@ -32,7 +32,7 @@ NpcIntegerDialog::NpcIntegerDialog(): Window(_("NPC Number Request")) { - mValueField = new IntTextField(); + mValueField = new IntTextField; mDecButton = new Button("-", "decvalue", this); mIncButton = new Button("+", "incvalue", this); diff --git a/src/gui/ok_dialog.cpp b/src/gui/ok_dialog.cpp index d9722704..4df3fa07 100644 --- a/src/gui/ok_dialog.cpp +++ b/src/gui/ok_dialog.cpp @@ -32,7 +32,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg, Window *parent): Window(title, true, parent) { - mTextBox = new TextBox(); + mTextBox = new TextBox; mTextBox->setEditable(false); mTextBox->setOpaque(false); diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 3503d0ea..62e44794 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -56,7 +56,7 @@ PopupMenu::PopupMenu(): setTitleBarHeight(0); setShowTitle(false); - mBrowserBox = new BrowserBox(); + mBrowserBox = new BrowserBox; mBrowserBox->setPosition(4, 4); mBrowserBox->setHighlightMode(BrowserBox::BACKGROUND); mBrowserBox->setOpaque(false); diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp index a46f3ce6..1d7cb52f 100644 --- a/src/gui/sell.cpp +++ b/src/gui/sell.cpp @@ -50,7 +50,7 @@ SellDialog::SellDialog(Network *network): setMinHeight(230); setDefaultSize(0, 0, 260, 230); - mShopItems = new ShopItems(); + mShopItems = new ShopItems; mShopItemList = new ShopListBox(mShopItems, mShopItems); mScrollArea = new ScrollArea(mShopItemList); diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 09f7109e..148e8b75 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -69,7 +69,7 @@ Setup::Setup(): btn->setEnabled(statusWindow != NULL); } - TabbedArea *panel = new TabbedArea(); + TabbedArea *panel = new TabbedArea; panel->setDimension(gcn::Rectangle(5, 5, width - 10, height - 40)); SetupTab *tab; diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp index 4f88f212..d8053ae6 100644 --- a/src/gui/setup_colors.cpp +++ b/src/gui/setup_colors.cpp @@ -59,7 +59,7 @@ Setup_Colors::Setup_Colors() : // Replace this later with a more appropriate link handler. For now, this'll // do, as it'll do nothing when clicked on. - mPreview->setLinkHandler(new ItemLinkHandler()); + mPreview->setLinkHandler(new ItemLinkHandler); mPreviewBox = new ScrollArea(mPreview); mPreviewBox->setHeight(20); @@ -68,7 +68,7 @@ Setup_Colors::Setup_Colors() : mRedLabel = new gcn::Label(_("Red: ")); - mRedText = new TextField(); + mRedText = new TextField; mRedText->setWidth(40); mRedText->setRange(0, 255); mRedText->setNumeric(true); @@ -82,7 +82,7 @@ Setup_Colors::Setup_Colors() : mGreenLabel = new gcn::Label(_("Green: ")); - mGreenText = new TextField(); + mGreenText = new TextField; mGreenText->setWidth(40); mGreenText->setRange(0, 255); mGreenText->setNumeric(true); @@ -96,7 +96,7 @@ Setup_Colors::Setup_Colors() : mBlueLabel = new gcn::Label(_("Blue: ")); - mBlueText = new TextField(); + mBlueText = new TextField; mBlueText->setWidth(40); mBlueText->setRange(0, 255); mBlueText->setNumeric(true); diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp index 6eef6f49..ab85900a 100644 --- a/src/gui/setup_keyboard.cpp +++ b/src/gui/setup_keyboard.cpp @@ -69,7 +69,7 @@ class KeyListModel : public gcn::ListModel }; Setup_Keyboard::Setup_Keyboard(): - mKeyListModel(new KeyListModel()), + mKeyListModel(new KeyListModel), mKeyList(new ListBox(mKeyListModel)), mKeySetting(false) { diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 44b52b54..96792436 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -139,10 +139,10 @@ public: std::string name = (*player_names)[r]; gcn::Widget *widget = new gcn::Label(name); mWidgets.push_back(widget); - gcn::ListModel *playerRelation = new PlayerRelationListModel(); + gcn::ListModel *playerRelation = new PlayerRelationListModel; gcn::DropDown *choicebox = new DropDown(playerRelation, - new ScrollArea(), + new ScrollArea, new ListBox(playerRelation), false); choicebox->setSelected(player_relations.getRelation(name)); @@ -220,7 +220,7 @@ public: Setup_Players::Setup_Players(): mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)), - mPlayerTableModel(new PlayerTableModel()), + mPlayerTableModel(new PlayerTableModel), mPlayerTable(new GuiTable(mPlayerTableModel)), mPlayerTitleTable(new GuiTable(mPlayerTableTitleModel)), mPlayerScrollArea(new ScrollArea(mPlayerTable)), @@ -240,8 +240,8 @@ Setup_Players::Setup_Players(): RELATION_CHOICE_COLUMN_WIDTH); mPlayerTitleTable->setBackgroundColor(gcn::Color(0xbf, 0xbf, 0xbf)); - gcn::ListModel *ignoreChoices = new IgnoreChoicesListModel(); - mIgnoreActionChoicesBox = new DropDown(ignoreChoices, new ScrollArea(), + gcn::ListModel *ignoreChoices = new IgnoreChoicesListModel; + mIgnoreActionChoicesBox = new DropDown(ignoreChoices, new ScrollArea, new ListBox(ignoreChoices), false); for (int i = 0; i < COLUMNS_NR; i++) diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 05b782d5..c3532072 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -236,7 +236,7 @@ bool SkillDialog::hasSkill(int id) void SkillDialog::addSkill(int id, int lvl, int mp) { - SKILL *tmp = new SKILL(); + SKILL *tmp = new SKILL; tmp->id = id; tmp->lv = lvl; tmp->sp = mp; diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp index c1451d51..4781bd36 100644 --- a/src/gui/speechbubble.cpp +++ b/src/gui/speechbubble.cpp @@ -41,7 +41,7 @@ SpeechBubble::SpeechBubble(): mCaption->setFont(boldFont); mCaption->setPosition(5, 3); - mSpeechBox = new TextBox(); + mSpeechBox = new TextBox; mSpeechBox->setEditable(false); mSpeechBox->setOpaque(false); diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index b3861b27..31d37e16 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -107,7 +107,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost, { mCurlError[0] = 0; - mBrowserBox = new BrowserBox(); + mBrowserBox = new BrowserBox; mScrollArea = new ScrollArea(mBrowserBox); mLabel = new gcn::Label(_("Connecting...")); mProgressBar = new ProgressBar(0.0, 310, 20, 168, 116, 31); diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index f5a6edb4..9b86a536 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -62,7 +62,7 @@ Viewport::Viewport(): config.addListener("ScrollLaziness", this); config.addListener("ScrollRadius", this); - mPopupMenu = new PopupMenu(); + mPopupMenu = new PopupMenu; } Viewport::~Viewport() diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 5ff7c4bc..ce11fe69 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -75,7 +75,7 @@ gcn::Widget* TabbedArea::getWidget(const std::string &name) void TabbedArea::addTab(const std::string &caption, gcn::Widget *widget) { - Tab* tab = new Tab(); + Tab* tab = new Tab; tab->setCaption(caption); mTabsToDelete.push_back(tab); diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 797b4be9..ee5613bc 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -87,7 +87,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent, const std if (instances == 0) { - windowConfigListener = new WindowConfigListener(); + windowConfigListener = new WindowConfigListener; // Send GUI alpha changed for initialization windowConfigListener->optionChanged("guialpha"); config.addListener("guialpha", windowConfigListener); @@ -244,7 +244,7 @@ void Window::setResizable(bool r) if (r) { - mGrip = new ResizeGrip(); + mGrip = new ResizeGrip; mGrip->setX(getWidth() - mGrip->getWidth() - getChildrenArea().x); mGrip->setY(getHeight() - mGrip->getHeight() - getChildrenArea().y); add(mGrip); |