diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-06-22 10:13:52 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-06-22 11:12:43 +0200 |
commit | 2f7774c60767d5579af0596caadbb0f9ca822963 (patch) | |
tree | ff5b91a79593ca311d43b17a0bbe1d5ceee9ca33 | |
parent | 6da48c4a3bdd2ff105c3ae55d29c6796bec5338b (diff) |
Change skill_type to non-POD type
-rw-r--r-- | src/init2.cc | 2 | ||||
-rw-r--r-- | src/skill_type.hpp | 30 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/init2.cc b/src/init2.cc index 3f785424..eefed7ca 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -343,7 +343,7 @@ namespace { static void allocate() { - s_info = make_array<skill_type>(max_s_idx); + s_info = new skill_type[max_s_idx]; } static errr parse(FILE *fp) diff --git a/src/skill_type.hpp b/src/skill_type.hpp index fdcdc2d7..4be4459a 100644 --- a/src/skill_type.hpp +++ b/src/skill_type.hpp @@ -8,27 +8,27 @@ */ struct skill_type { - const char *name; /* Name */ - char *desc; /* Description */ + const char *name = nullptr; /* Name */ + char *desc = nullptr; /* Description */ - const char *action_desc; /* Action Description */ + const char *action_desc = nullptr; /* Action Description */ - s16b action_mkey; /* Action do to */ + s16b action_mkey = 0; /* Action do to */ - s32b i_value; /* Actual value */ - s32b i_mod; /* Modifier(1 skill point = modifier skill) */ + s32b i_value = 0; /* Current value */ + s32b i_mod = 0; /* Modifier, i.e. how much value 1 skill point gives */ - s32b value; /* Actual value */ - s32b mod; /* Modifier(1 skill point = modifier skill) */ + s32b value = 0; /* Current value */ + s32b mod = 0; /* Modifier, i.e. how much value 1 skill point gives */ - s16b action[MAX_SKILLS]; /* List of actions against other skills */ + s16b action[MAX_SKILLS] = { 0 }; /* List of actions against other skills */ - s16b father; /* Father in the skill tree */ - bool_ dev; /* Is the branch developped ? */ - s16b order; /* Order in the tree */ - bool_ hidden; /* Innactive */ + s16b father = 0; /* Father in the skill tree */ + bool_ dev = FALSE; /* Is the branch developped ? */ + s16b order = 0; /* Order in the tree */ + bool_ hidden = FALSE; /* Inactive */ - byte random_gain_chance; /* random gain chance, still needs the flag */ + byte random_gain_chance = 0; /* Chance to gain from Lost Sword quest; if applicable */ - u32b flags1; /* Skill flags */ + u32b flags1 = 0; /* Skill flags */ }; |