summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-15 22:21:45 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-15 22:25:38 +0100
commite4d63db096901c1d67d0feb72d77bc5d0c8ba1b3 (patch)
treeb07ce915d1e5d4cdd83cf4ab858c69d782ab0fe0 /src
parent08c9cde4726f94698ea938d464cd1de95b7be587 (diff)
downloadmana-client-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.gz
mana-client-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.bz2
mana-client-e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3.tar.xz
mana-client-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')
-rw-r--r--src/being.cpp6
-rw-r--r--src/configuration.cpp2
-rw-r--r--src/configuration.h4
-rw-r--r--src/game.cpp52
-rw-r--r--src/gui/char_server.cpp2
-rw-r--r--src/gui/chat.cpp2
-rw-r--r--src/gui/confirm_dialog.cpp2
-rw-r--r--src/gui/emotewindow.cpp2
-rw-r--r--src/gui/equipmentwindow.cpp2
-rw-r--r--src/gui/gui.cpp4
-rw-r--r--src/gui/help.cpp2
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/itemcontainer.cpp2
-rw-r--r--src/gui/itempopup.cpp6
-rw-r--r--src/gui/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/login.cpp2
-rw-r--r--src/gui/npcintegerdialog.cpp2
-rw-r--r--src/gui/ok_dialog.cpp2
-rw-r--r--src/gui/popupmenu.cpp2
-rw-r--r--src/gui/sell.cpp2
-rw-r--r--src/gui/setup.cpp2
-rw-r--r--src/gui/setup_colors.cpp8
-rw-r--r--src/gui/setup_keyboard.cpp2
-rw-r--r--src/gui/setup_players.cpp10
-rw-r--r--src/gui/skill.cpp2
-rw-r--r--src/gui/speechbubble.cpp2
-rw-r--r--src/gui/updatewindow.cpp2
-rw-r--r--src/gui/viewport.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/window.cpp4
-rw-r--r--src/localplayer.cpp4
-rw-r--r--src/main.cpp16
-rw-r--r--src/resources/itemdb.cpp2
-rw-r--r--src/resources/mapreader.cpp2
-rw-r--r--src/resources/monsterdb.cpp2
-rw-r--r--src/resources/resourcemanager.cpp2
-rw-r--r--src/resources/spritedef.cpp4
-rw-r--r--src/simpleanimation.cpp2
-rw-r--r--src/statuseffect.cpp4
39 files changed, 88 insertions, 88 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 86811e33..7893c97d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -99,7 +99,7 @@ Being::Being(int id, int job, Map *map):
{
setMap(map);
- mSpeechBubble = new SpeechBubble();
+ mSpeechBubble = new SpeechBubble;
if (instances == 0)
{
@@ -440,7 +440,7 @@ void Being::logic()
}
// Update sprite animations
- if (mUsedTargetCursor != NULL)
+ if (mUsedTargetCursor)
mUsedTargetCursor->update(tick_time * 10);
for (int i = 0; i < VECTOREND_SPRITE; i++)
@@ -471,7 +471,7 @@ void Being::draw(Graphics *graphics, int offsetX, int offsetY) const
int px = mPx + offsetX;
int py = mPy + offsetY;
- if (mUsedTargetCursor != NULL)
+ if (mUsedTargetCursor)
{
mUsedTargetCursor->draw(graphics, px, py);
}
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 6815ea03..7a1ecf3c 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -106,7 +106,7 @@ void ConfigurationObject::initFromXML(xmlNodePtr parent_node)
{
if (xmlStrEqual(subnode->name, BAD_CAST name.c_str())
&& subnode->type == XML_ELEMENT_NODE) {
- ConfigurationObject *cobj = new ConfigurationObject();
+ ConfigurationObject *cobj = new ConfigurationObject;
cobj->initFromXML(subnode); // recurse
diff --git a/src/configuration.h b/src/configuration.h
index 4d28008d..0b2dc446 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -126,7 +126,7 @@ class ConfigurationObject
template <class IT, class T, class CONT>
void setList(const std::string &name, IT begin, IT end, ConfigurationListManager<T, CONT> *manager)
{
- ConfigurationObject *nextobj = new ConfigurationObject();
+ ConfigurationObject *nextobj = new ConfigurationObject;
deleteList(name);
ConfigurationList *list = &(mContainerOptions[name]);
@@ -134,7 +134,7 @@ class ConfigurationObject
ConfigurationObject *wrobj = manager->writeConfigItem(*it, nextobj);
if (wrobj) { // wrote something
assert (wrobj == nextobj);
- nextobj = new ConfigurationObject();
+ nextobj = new ConfigurationObject;
list->push_back(wrobj);
} else
nextobj->clear(); // you never know...
diff --git a/src/game.cpp b/src/game.cpp
index 68380f5b..cc5121fd 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -193,25 +193,25 @@ void createGuiWindows(Network *network)
{
// Create dialogs
chatWindow = new ChatWindow(network);
- menuWindow = new MenuWindow();
+ menuWindow = new MenuWindow;
statusWindow = new StatusWindow(player_node);
- miniStatusWindow = new MiniStatusWindow();
+ miniStatusWindow = new MiniStatusWindow;
buyDialog = new BuyDialog(network);
sellDialog = new SellDialog(network);
- buySellDialog = new BuySellDialog();
- inventoryWindow = new InventoryWindow();
- emoteWindow = new EmoteWindow();
- npcTextDialog = new NpcTextDialog();
- npcIntegerDialog = new NpcIntegerDialog();
- npcListDialog = new NpcListDialog();
- npcStringDialog = new NpcStringDialog();
- skillDialog = new SkillDialog();
- setupWindow = new Setup();
- minimap = new Minimap();
- equipmentWindow = new EquipmentWindow();
+ buySellDialog = new BuySellDialog;
+ inventoryWindow = new InventoryWindow;
+ emoteWindow = new EmoteWindow;
+ npcTextDialog = new NpcTextDialog;
+ npcIntegerDialog = new NpcIntegerDialog;
+ npcListDialog = new NpcListDialog;
+ npcStringDialog = new NpcStringDialog;
+ skillDialog = new SkillDialog;
+ setupWindow = new Setup;
+ minimap = new Minimap;
+ equipmentWindow = new EquipmentWindow;
tradeWindow = new TradeWindow(network);
- helpWindow = new HelpWindow();
- debugWindow = new DebugWindow();
+ helpWindow = new HelpWindow;
+ debugWindow = new DebugWindow;
itemShortcutWindow = new ShortcutWindow("ItemShortcut",new ItemShortcutContainer);
emoteShortcutWindow = new ShortcutWindow("emoteShortcut",new EmoteShortcutContainer);
@@ -268,22 +268,22 @@ void destroyGuiWindows()
Game::Game(Network *network):
mNetwork(network),
mBeingHandler(new BeingHandler(config.getValue("EnableSync", 0) == 1)),
- mBuySellHandler(new BuySellHandler()),
- mChatHandler(new ChatHandler()),
- mEquipmentHandler(new EquipmentHandler()),
- mInventoryHandler(new InventoryHandler()),
- mItemHandler(new ItemHandler()),
- mNpcHandler(new NPCHandler()),
- mPlayerHandler(new PlayerHandler()),
- mSkillHandler(new SkillHandler()),
- mTradeHandler(new TradeHandler())
+ mBuySellHandler(new BuySellHandler),
+ mChatHandler(new ChatHandler),
+ mEquipmentHandler(new EquipmentHandler),
+ mInventoryHandler(new InventoryHandler),
+ mItemHandler(new ItemHandler),
+ mNpcHandler(new NPCHandler),
+ mPlayerHandler(new PlayerHandler),
+ mSkillHandler(new SkillHandler),
+ mTradeHandler(new TradeHandler)
{
createGuiWindows(network);
engine = new Engine(network);
beingManager = new BeingManager(network);
- floorItemManager = new FloorItemManager();
- effectManager = new EffectManager();
+ floorItemManager = new FloorItemManager;
+ effectManager = new EffectManager;
particleEngine = new Particle(NULL);
particleEngine->setupEngine();
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);
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 33f2f480..2487ab54 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -68,7 +68,7 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
ATK_BONUS(0), MATK_BONUS(0), DEF_BONUS(0), MDEF_BONUS(0), FLEE_BONUS(0),
mStatPoint(0), mSkillPoint(0),
mStatsPointsToAttribute(0),
- mEquipment(new Equipment()),
+ mEquipment(new Equipment),
mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
mTrading(false), mGoingToTarget(false),
@@ -680,7 +680,7 @@ void LocalPlayer::loadTargetCursor(std::string filename, int width, int height,
ResourceManager *resman = ResourceManager::getInstance();
currentImageSet = resman->getImageSet(filename, width, height);
- Animation *anim = new Animation();
+ Animation *anim = new Animation;
for (unsigned int i = 0; i < currentImageSet->size(); ++i)
{
diff --git a/src/main.cpp b/src/main.cpp
index 85ea4b1f..500a46b4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -410,10 +410,10 @@ void init_engine(const Options &options)
Image::setLoadAsOpenGL(useOpenGL);
// Create the graphics context
- graphics = useOpenGL ? new OpenGLGraphics() : new Graphics();
+ graphics = useOpenGL ? new OpenGLGraphics : new Graphics;
#else
// Create the graphics context
- graphics = new Graphics();
+ graphics = new Graphics;
#endif
const int width = (int) config.getValue("screenwidth", defaultScreenWidth);
@@ -435,10 +435,10 @@ void init_engine(const Options &options)
graphics->_beginDraw();
// Initialize the item shortcuts.
- itemShortcut = new ItemShortcut();
+ itemShortcut = new ItemShortcut;
// Initialize the emote shortcuts.
- emoteShortcut = new EmoteShortcut();
+ emoteShortcut = new EmoteShortcut;
gui = new Gui(graphics);
state = LOGIN_STATE; /**< Initial game state */
@@ -724,7 +724,7 @@ extern "C" char const *_nl_locale_name_default(void);
/** Main */
int main(int argc, char *argv[])
{
- logger = new Logger();
+ logger = new Logger;
Options options;
@@ -773,12 +773,12 @@ int main(int argc, char *argv[])
unsigned int oldstate = !state; // We start with a status change.
// Needs to be created in main, as the updater uses it
- textColor = new Color();
+ textColor = new Color;
Game *game = NULL;
Window *currentDialog = NULL;
Image *login_wallpaper = NULL;
- setupWindow = new Setup();
+ setupWindow = new Setup;
gcn::Container *top = static_cast<gcn::Container*>(gui->getTop());
#ifdef PACKAGE_VERSION
@@ -812,7 +812,7 @@ int main(int argc, char *argv[])
loginData.registerLogin = false;
SDLNet_Init();
- Network *network = new Network();
+ Network *network = new Network;
// Set the most appropriate wallpaper, based on screen width
int screenWidth = (int) config.getValue("screenwidth", defaultScreenWidth);
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 47538b87..577b9947 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -51,7 +51,7 @@ void ItemDB::load()
logger->log("Initializing item database...");
- mUnknown = new ItemInfo();
+ mUnknown = new ItemInfo;
mUnknown->setName(_("Unknown item"));
mUnknown->setImageName("");
mUnknown->setSprite("error.xml", GENDER_MALE);
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 3270c665..53df40c3 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -522,7 +522,7 @@ Tileset *MapReader::readTileset(xmlNodePtr node,
// create animation
if (!set) continue;
- Animation *ani = new Animation();
+ Animation *ani = new Animation;
for (int i = 0; ;i++)
{
std::map<std::string, int>::iterator iFrame, iDelay;
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 25a3102c..e0259b29 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -61,7 +61,7 @@ void MonsterDB::load()
continue;
}
- MonsterInfo *currentInfo = new MonsterInfo();
+ MonsterInfo *currentInfo = new MonsterInfo;
currentInfo->setName(XML::getProperty(monsterNode, "name", _("unnamed")));
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index fa8f4654..50eda0ce 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -379,7 +379,7 @@ ResourceManager *ResourceManager::getInstance()
{
// Create a new instance if necessary.
if (!instance)
- instance = new ResourceManager();
+ instance = new ResourceManager;
return instance;
}
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 20c79e73..0a87db16 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -166,7 +166,7 @@ void SpriteDef::loadAction(xmlNodePtr node, int variant_offset)
actionName.c_str(), getIdPath().c_str());
return;
}
- Action *action = new Action();
+ Action *action = new Action;
mActions[actionType] = action;
// When first action set it as default direction
@@ -200,7 +200,7 @@ void SpriteDef::loadAnimation(xmlNodePtr animationNode,
return;
}
- Animation *animation = new Animation();
+ Animation *animation = new Animation;
action->setAnimation(directionType, animation);
// Get animation frames
diff --git a/src/simpleanimation.cpp b/src/simpleanimation.cpp
index 87ef69e3..65d8e8e2 100644
--- a/src/simpleanimation.cpp
+++ b/src/simpleanimation.cpp
@@ -40,7 +40,7 @@ SimpleAnimation::SimpleAnimation(xmlNodePtr animationNode):
mAnimationTime(0),
mAnimationPhase(0)
{
- mAnimation = new Animation();
+ mAnimation = new Animation;
ImageSet *imageset = ResourceManager::getInstance()->getImageSet(
XML::getProperty(animationNode, "imageset", ""),
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 7a50e794..c0d689f0 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -149,8 +149,8 @@ void StatusEffect::load()
the_map = &stunEffects;
if (the_map) {
- StatusEffect *startEffect = new StatusEffect();
- StatusEffect *endEffect = new StatusEffect();
+ StatusEffect *startEffect = new StatusEffect;
+ StatusEffect *endEffect = new StatusEffect;
startEffect->mMessage = XML::getProperty(node, "start-message", "");
startEffect->mSFXEffect = XML::getProperty(node, "start-audio", "");