summaryrefslogtreecommitdiff
path: root/src/vault_type.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-03-10 18:41:54 +0100
committerBardur Arantsson <bardur@scientician.net>2016-03-10 19:02:23 +0100
commit4632374161221b21423b2cf5c88f3bc4e7d7afe6 (patch)
treefff7e0ae6124bd6c753d61273ef5cea61151e2c5 /src/vault_type.hpp
parentac4ab3a025f2e90c7a6d754207a25cc968375e58 (diff)
Use std::vector for vault data
Diffstat (limited to 'src/vault_type.hpp')
-rw-r--r--src/vault_type.hpp19
1 files changed, 10 insertions, 9 deletions
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 <string>
/**
* 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) */
};