From a3b2076ba0b398523c3e0428c2400184e83c4f62 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Mar 2013 21:19:28 +0300 Subject: Last fixes after Coverity checks. --- src/map.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/map.cpp') 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, -- cgit v1.2.3-60-g2f50