summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-02 21:19:28 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-02 21:19:28 +0300
commita3b2076ba0b398523c3e0428c2400184e83c4f62 (patch)
treeae13ed62556e9b7343b9330089fa3dad2a8b67d2 /src/map.cpp
parent6f23241ba9d7d908534dade0e03041486a970ddc (diff)
downloadplus-a3b2076ba0b398523c3e0428c2400184e83c4f62.tar.gz
plus-a3b2076ba0b398523c3e0428c2400184e83c4f62.tar.bz2
plus-a3b2076ba0b398523c3e0428c2400184e83c4f62.tar.xz
plus-a3b2076ba0b398523c3e0428c2400184e83c4f62.zip
Last fixes after Coverity checks.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp
index c3338f6d4..76947ad7d 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1252,12 +1252,10 @@ void Map::addPortal(const std::string &name, const int type,
void Map::addPortalTile(const std::string &name, const int type,
const int x, const int y)
{
- MapItem *item = new MapItem(type, name, x, y);
if (mSpecialLayer)
- mSpecialLayer->setTile(x, y, item);
+ mSpecialLayer->setTile(x, y, new MapItem(type, name, x, y));
- item = new MapItem(type, name, x, y);
- mMapPortals.push_back(item);
+ mMapPortals.push_back(new MapItem(type, name, x, y));
}
void Map::updatePortalTile(const std::string &name, const int type,