From 4632374161221b21423b2cf5c88f3bc4e7d7afe6 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Thu, 10 Mar 2016 18:41:54 +0100 Subject: Use std::vector for vault data --- src/vault_type.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/vault_type.hpp') diff --git a/src/vault_type.hpp b/src/vault_type.hpp index 650599cb..9d407d8f 100644 --- a/src/vault_type.hpp +++ b/src/vault_type.hpp @@ -1,24 +1,25 @@ #pragma once #include "h-basic.h" +#include /** * Vault descriptors. */ struct vault_type { - char *data; /* Vault data */ + std::string data; /* Vault data */ - byte typ; /* Vault type */ + byte typ = 0; /* Vault type */ - byte rat; /* Vault rating */ + byte rat = 0; /* Vault rating */ - byte hgt; /* Vault height */ - byte wid; /* Vault width */ + byte hgt = 0; /* Vault height */ + byte wid = 0; /* Vault width */ - s16b lvl; /* level of special (if any) */ - byte dun_type; /* Dungeon type where the level will show up */ + s16b lvl = 0; /* level of special (if any) */ + byte dun_type = 0; /* Dungeon type where the level will show up */ - s16b mon[10]; /* special monster */ - int item[3]; /* number of item (usually artifact) */ + s16b mon[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* special monster */ + int item[3] = { 0, 0, 0 }; /* number of item (usually artifact) */ }; -- cgit v1.2.3