From dd06086eb9613ba7d09bfb57df34d8fa0ca43eb3 Mon Sep 17 00:00:00 2001 From: MrStevns Date: Tue, 29 Aug 2023 18:45:09 +0200 Subject: [PATCH] Remove unused methods --- core_lib/src/graphics/bitmap/tiledbuffer.cpp | 16 ---------------- core_lib/src/graphics/bitmap/tiledbuffer.h | 19 ------------------- 2 files changed, 35 deletions(-) diff --git a/core_lib/src/graphics/bitmap/tiledbuffer.cpp b/core_lib/src/graphics/bitmap/tiledbuffer.cpp index cb9048ba3..98630eb3e 100644 --- a/core_lib/src/graphics/bitmap/tiledbuffer.cpp +++ b/core_lib/src/graphics/bitmap/tiledbuffer.cpp @@ -167,19 +167,3 @@ QPoint TiledBuffer::getTilePos(const TileIndex& index) const return QPoint { qRound(UNIFORM_TILE_SIZE*static_cast(index.x)), qRound(UNIFORM_TILE_SIZE*static_cast(index.y)) }; } - -TileIndex TiledBuffer::getTileIndex(const TileIndex& pos) const -{ - return { qRound(static_cast(pos.x)/UNIFORM_TILE_SIZE), - qRound(static_cast(pos.y)/UNIFORM_TILE_SIZE) }; -} - -QRect TiledBuffer::getRectForPoint(const QPoint& point, const QSize size) const -{ - return QRect(point.x(), point.y(), size.width(), size.height()); -} - -QRect TiledBuffer::getRectForPoint(const QPoint& point) const -{ - return QRect(point.x(), point.y(), UNIFORM_TILE_SIZE, UNIFORM_TILE_SIZE); -} diff --git a/core_lib/src/graphics/bitmap/tiledbuffer.h b/core_lib/src/graphics/bitmap/tiledbuffer.h index 99e0c1440..25273bff7 100644 --- a/core_lib/src/graphics/bitmap/tiledbuffer.h +++ b/core_lib/src/graphics/bitmap/tiledbuffer.h @@ -66,7 +66,6 @@ class TiledBuffer: public QObject const QRect& bounds() const { return mTileBounds; } - signals: void tileUpdated(TiledBuffer* tiledBuffer, Tile* tile); void tileCreated(TiledBuffer* tiledBuffer, Tile* tile); @@ -78,24 +77,6 @@ class TiledBuffer: public QObject Tile* getTileFromIndex(const TileIndex& tileIndex); inline QPoint getTilePos(const TileIndex& index) const; - inline TileIndex getTileIndex(const TileIndex& pos) const; - - /** - * @brief getRectForPoint - * Returns a rectangle with a specified size for the given point - * @param point - * @param size - * @return QRect - */ - QRect getRectForPoint(const QPoint& point, const QSize size) const; - - /** - * @brief getRectForPoint - * Returns a rectangle with the size of UNIFORM_TILE_SIZE (64,64) - * @param point - * @return QRect - */ - QRect getRectForPoint(const QPoint& point) const; const int UNIFORM_TILE_SIZE = 64;