summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--labb3/tiles/TileList.cpp2
-rw-r--r--labb3/tiles/TileList.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/labb3/tiles/TileList.cpp b/labb3/tiles/TileList.cpp
index cc7ad45..bb00063 100644
--- a/labb3/tiles/TileList.cpp
+++ b/labb3/tiles/TileList.cpp
@@ -11,7 +11,7 @@ TileList::~TileList()
delete[] tiles;
}
-void TileList::addTile(Tile tile)
+void TileList::addTile(const Tile &tile)
{
// O(1) (amortized)
if (amount_tiles == cur_size) {
diff --git a/labb3/tiles/TileList.h b/labb3/tiles/TileList.h
index 3b5081f..6ba17c4 100644
--- a/labb3/tiles/TileList.h
+++ b/labb3/tiles/TileList.h
@@ -25,7 +25,7 @@ public:
/*
* Add `tile` to the tile list, possibly reallocating. O(1) amortized.
*/
- void addTile(Tile tile);
+ void addTile(const Tile &tile);
/*
* Draw all tiles to `scene`. O(n).