From a6c2ddeb9253fdcf5c0ac6153f77fa65f4a72e2b Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 20 Jun 2016 22:49:05 +0200 Subject: Change store_type to non-POD type --- src/store_type.hpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/store_type.hpp') diff --git a/src/store_type.hpp b/src/store_type.hpp index e3f917ac..5fb4ac7f 100644 --- a/src/store_type.hpp +++ b/src/store_type.hpp @@ -1,7 +1,9 @@ #pragma once #include "h-basic.h" -#include "object_type.hpp" +#include "object_type_fwd.hpp" + +#include /** * A store, with an owner, various state flags, a current stock @@ -9,35 +11,30 @@ */ struct store_type { - u16b st_idx; + u16b st_idx = 0; /** * Owner index */ - u16b owner; + u16b owner = 0; /** * Closed until this turn. */ - s32b store_open; + s32b store_open = 0; /** * Last visited on this turn. */ - s32b last_visit; - - /** - * Stock: Number of entries. - */ - byte stock_num; + s32b last_visit = 0; /** * Stock: Total size of array */ - s16b stock_size; + u16b stock_size = 0; /** * Stock: Actual stock items */ - object_type *stock; + std::vector stock; }; -- cgit v1.2.3