summaryrefslogtreecommitdiffstats
path: root/labb3
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-09-22 11:24:20 +0200
committerGustav Sörnäs <gustav@sornas.net>2020-09-22 11:24:20 +0200
commit5e715803631c58f5934eb41cf2a5ca3268d26796 (patch)
treeb2c67a10a4c1d745250effbba30e9906f35faa96 /labb3
parent3f26c22f0f12102ffd42f123b7a066ea07042a58 (diff)
downloadtddd86-5e715803631c58f5934eb41cf2a5ca3268d26796.tar.gz
References
Diffstat (limited to 'labb3')
-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).