summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-10 16:40:52 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-10 16:40:52 +0300
commit4df1e68047488ec00a264c076bb3222715f42295 (patch)
tree22ea99ebcd00a6c9d6da0729706b765a49085c5f /src/resources
parentbfc5d7483c0a81409ebf08603f634e88b8db03f8 (diff)
downloadmv-4df1e68047488ec00a264c076bb3222715f42295.tar.gz
mv-4df1e68047488ec00a264c076bb3222715f42295.tar.bz2
mv-4df1e68047488ec00a264c076bb3222715f42295.tar.xz
mv-4df1e68047488ec00a264c076bb3222715f42295.zip
Fix new style issue detected by mplint.
new class() -> new class
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/atlas/atlasmanager.cpp4
-rw-r--r--src/resources/db/questdb.cpp2
-rw-r--r--src/resources/iteminfo.cpp2
-rw-r--r--src/resources/map/maplayer.cpp8
-rw-r--r--src/resources/map/objectslayer.cpp2
-rw-r--r--src/resources/skill/skillinfo.cpp2
-rw-r--r--src/resources/sprite/spritedef.cpp2
7 files changed, 11 insertions, 11 deletions
diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp
index f724618b5..46894b24b 100644
--- a/src/resources/atlas/atlasmanager.cpp
+++ b/src/resources/atlas/atlasmanager.cpp
@@ -212,7 +212,7 @@ void AtlasManager::simpleSort(const std::string &restrict name,
int x = 0;
int y = 0;
int tempHeight = 0;
- TextureAtlas *atlas = new TextureAtlas();
+ TextureAtlas *atlas = new TextureAtlas;
std::vector<Image*>::const_iterator it = images.begin();
const std::vector<Image*>::const_iterator it_end = images.end();
for (it = images.begin(); it != it_end; ++ it)
@@ -247,7 +247,7 @@ void AtlasManager::simpleSort(const std::string &restrict name,
x = 0;
y = 0;
atlases.push_back(atlas);
- atlas = new TextureAtlas();
+ atlas = new TextureAtlas;
atlas->name = std::string("atlas_").append(name).append(
"_").append(img->getIdPath());
}
diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp
index c28c9c278..91dd44ac4 100644
--- a/src/resources/db/questdb.cpp
+++ b/src/resources/db/questdb.cpp
@@ -56,7 +56,7 @@ static void loadQuest(const int var,
{
if (!node)
return;
- QuestItem *const quest = new QuestItem();
+ QuestItem *const quest = new QuestItem;
// TRANSLATORS: quests window quest name
quest->name = XML::langProperty(node, "name", _("unknown"));
quest->group = XML::getProperty(node, "group", "");
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index fabf96f3b..6c0363e6c 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -178,7 +178,7 @@ IntMap *ItemInfo::addReplaceSprite(const int sprite,
if (!spMap)
{
- spMap = new SpriteToItemMap();
+ spMap = new SpriteToItemMap;
mSpriteToItemReplaceMap[direction] = spMap;
mSpriteToItemReplaceList.push_back(spMap);
}
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 57e49b3eb..4c6fe3a1e 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -230,7 +230,7 @@ void MapLayer::updateSDL(const Graphics *const graphics,
for (int y = startY; y < endY; y++)
{
- MapRowVertexes *const row = new MapRowVertexes();
+ MapRowVertexes *const row = new MapRowVertexes;
mTempRows.push_back(row);
const Image *lastImage = nullptr;
@@ -252,7 +252,7 @@ void MapLayer::updateSDL(const Graphics *const graphics,
{
if (lastImage != img)
{
- imgVert = new ImageVertexes();
+ imgVert = new ImageVertexes;
imgVert->image = img;
row->images.push_back(imgVert);
lastImage = img;
@@ -293,7 +293,7 @@ void MapLayer::updateOGL(Graphics *const graphics,
const int dx = mPixelX - scrollX;
const int dy = mPixelY - scrollY;
- MapRowVertexes *const row = new MapRowVertexes();
+ MapRowVertexes *const row = new MapRowVertexes;
mTempRows.push_back(row);
Image *lastImage = nullptr;
ImageVertexes *imgVert = nullptr;
@@ -330,7 +330,7 @@ void MapLayer::updateOGL(Graphics *const graphics,
{
if (lastImage)
imgSet[lastImage->mGLImage] = imgVert;
- imgVert = new ImageVertexes();
+ imgVert = new ImageVertexes;
imgVert->ogl.init();
imgVert->image = img;
row->images.push_back(imgVert);
diff --git a/src/resources/map/objectslayer.cpp b/src/resources/map/objectslayer.cpp
index 0495f4e7a..a100b2c7d 100644
--- a/src/resources/map/objectslayer.cpp
+++ b/src/resources/map/objectslayer.cpp
@@ -64,7 +64,7 @@ void ObjectsLayer::addObject(const std::string &name, const int type,
for (unsigned i = idx1; i < idx2; i ++)
{
if (!mTiles[i])
- mTiles[i] = new MapObjectList();
+ mTiles[i] = new MapObjectList;
mTiles[i]->objects.push_back(MapObject(type, name));
}
}
diff --git a/src/resources/skill/skillinfo.cpp b/src/resources/skill/skillinfo.cpp
index 62bc54941..7f0099a5c 100644
--- a/src/resources/skill/skillinfo.cpp
+++ b/src/resources/skill/skillinfo.cpp
@@ -67,7 +67,7 @@ SkillInfo::SkillInfo() :
alwaysVisible(Visible_false),
useTextParameter(false)
{
- dataMap[0] = new SkillData();
+ dataMap[0] = new SkillData;
data = dataMap[0];
}
diff --git a/src/resources/sprite/spritedef.cpp b/src/resources/sprite/spritedef.cpp
index 544729d6a..3eb30d27d 100644
--- a/src/resources/sprite/spritedef.cpp
+++ b/src/resources/sprite/spritedef.cpp
@@ -565,7 +565,7 @@ void SpriteDef::addAction(const unsigned hp, const std::string &name,
{
const Actions::const_iterator i = mActions.find(hp);
if (i == mActions.end())
- mActions[hp] = new ActionMap();
+ mActions[hp] = new ActionMap;
(*mActions[hp])[name] = action;
}