From 0e0389752a0912614737e5c059b5cd4719ef9cf2 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 10 Mar 2015 19:42:04 -0400 Subject: Const correctness! Also created savefile and refactored collisions a bit. --- src/map.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index e3d1802..071b6f2 100644 --- a/src/map.h +++ b/src/map.h @@ -10,19 +10,19 @@ class Map { Map& operator= (Map other); friend void swap(Map& first, Map& second); - const int* mapdata(); - const char* title(); - Map* getLeftMap(); - Map* getRightMap(); - void setLeftMap(Map* m); - void setRightMap(Map* m); + const int* mapdata() const; + const char* title() const; + const Map* getLeftMap() const; + const Map* getRightMap() const; + void setLeftMap(const Map* m); + void setRightMap(const Map* m); private: Map(); int* m_mapdata; char* m_title; - Map* m_leftMap; - Map* m_rightMap; + const Map* m_leftMap = nullptr; + const Map* m_rightMap = nullptr; }; #endif -- cgit 1.4.1