better managed ownership (two new functions in level.h)

This commit is contained in:
2024-07-16 23:36:31 -04:00
parent 3b164bbe9f
commit 3232d91ac1
14 changed files with 74 additions and 50 deletions

View File

@ -2,6 +2,7 @@
#define __POTION_H__
#include <vector>
#include <memory>
#include "fraction.h"
#include "output.h"
@ -40,7 +41,8 @@ public:
};
typedef std::vector<potion *> potion_list;
typedef std::vector<std::unique_ptr<potion> > potion_own_list;
potion *get_potion_at(const position &pos, potion_list &plist);
size_t get_potion_at(const position &pos, const potion_list &plist);
#endif