From bbdd298ebef6996b8952aac2a605e8fb1c51f88e Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 18 Apr 2013 10:07:09 +0200 Subject: [PATCH] Removed TileManager::removeTile. --- source/sprites/TileManager.cpp | 11 ----------- source/sprites/TileManager.h | 1 - 2 files changed, 12 deletions(-) diff --git a/source/sprites/TileManager.cpp b/source/sprites/TileManager.cpp index 97d9410..67b25e9 100644 --- a/source/sprites/TileManager.cpp +++ b/source/sprites/TileManager.cpp @@ -97,17 +97,6 @@ TileManager::insertTile(const TilePosition& position, Type type) { mWorld.insert(tile); } - -void -TileManager::removeTile(const TilePosition& position) { - for (auto it = mTiles.begin(); it != mTiles.end(); it++) { - if ((*it)->getTilePosition() == position) { - mWorld.remove(*it); - mTiles.erase(it); - } - } -} - /* * Performs a raycast between two points to check if the path between them is * clear of walls. diff --git a/source/sprites/TileManager.h b/source/sprites/TileManager.h index 4377a66..ec1fade 100644 --- a/source/sprites/TileManager.h +++ b/source/sprites/TileManager.h @@ -31,7 +31,6 @@ public: explicit TileManager(World& world); void insertTile(const TilePosition& position, Type type); - void removeTile(const TilePosition& position); bool raycast(const sf::Vector2f& lineStart, const sf::Vector2f& lineEnd) const;