diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 21:51:06 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 21:51:06 +0100 |
commit | 80ed1262bd654fe2de30389f97a985b5f2c1d783 (patch) | |
tree | 020b1b63d637e07882c9a10d81fe2ac04ce82bcc /backend/Location.h | |
parent | c45a436fc594101f676cfabe90225d825d935fec (diff) |
add more containers and fix use after free
Diffstat (limited to 'backend/Location.h')
-rw-r--r-- | backend/Location.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backend/Location.h b/backend/Location.h index 464328b..3a1f5ac 100644 --- a/backend/Location.h +++ b/backend/Location.h @@ -1,11 +1,11 @@ #pragma once -#include "List.h" +#include "PtrList.h" #include "ListIterator.h" -#include "backend/String.h" +#include "String.h" +#include "Enemy.h" +#include "Object.h" -class Enemy; -class Object; class Location; enum Direction { @@ -49,14 +49,14 @@ private: friend class LocationFactory; Location(const String & name, const String & description); public: - virtual ~Location(); + virtual ~Location() = default; private: String name; String description; - List<Enemy*> enemies; - List<Object*> hidden_objects; - List<Object*> visible_objects; + PtrList<Enemy> enemies; + PtrList<Object> hidden_objects; + PtrList<Object> visible_objects; Location * edges[4] = { nullptr, |