From e4d63db096901c1d67d0feb72d77bc5d0c8ba1b3 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 15 Feb 2009 22:21:45 +0100 Subject: Removed unnecessary parenthesis at constructors When not passing any parameters to constructors, there is no reason for using parenthesis. --- src/resources/itemdb.cpp | 2 +- src/resources/mapreader.cpp | 2 +- src/resources/monsterdb.cpp | 2 +- src/resources/resourcemanager.cpp | 2 +- src/resources/spritedef.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/resources') 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::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 -- cgit v1.2.3-70-g09d2