better managed ownership (two new functions in level.h)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user