summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commit4fb8fb773d93efe1cdc812d1046c530c20098455 (patch)
tree6603e2925061e1150dac2f21b213c2f514510868 /src
parent288c3d3f725eabfee06507966a0ba63bf587c3da (diff)
Remove dead code
Fixes a few compiler warnings.
Diffstat (limited to 'src')
-rw-r--r--src/bldg.cc4
-rw-r--r--src/cmd5.cc1
-rw-r--r--src/gods.cc1
-rw-r--r--src/init1.cc5
4 files changed, 0 insertions, 11 deletions
diff --git a/src/bldg.cc b/src/bldg.cc
index ae64efaf..d465dbbe 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -1094,8 +1094,6 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
bool_ paid = FALSE;
- bool_ set_reward = FALSE;
-
bool_ recreate = FALSE;
@@ -1129,8 +1127,6 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
return FALSE;
}
- if (!bcost) set_reward = TRUE;
-
switch (bact)
{
case BACT_RESEARCH_ITEM:
diff --git a/src/cmd5.cc b/src/cmd5.cc
index 2fd9801e..e2c2e1b8 100644
--- a/src/cmd5.cc
+++ b/src/cmd5.cc
@@ -809,7 +809,6 @@ static std::tuple<int, int> choose_monster_power(monster_race const *r_ptr, bool
*/
static void apply_monster_power(monster_race const *r_ptr, std::size_t monster_spell_idx)
{
- assert(monster_spell_idx >= 0);
assert(monster_spell_idx < monster_spell_flag_set::nbits);
/* Shorthand */
diff --git a/src/gods.cc b/src/gods.cc
index f10209dc..7da62d7a 100644
--- a/src/gods.cc
+++ b/src/gods.cc
@@ -162,7 +162,6 @@ int wisdom_scale(int max)
*/
deity_type *god_at(byte god_idx)
{
- assert(god_idx >= 0);
assert(god_idx < MAX_GODS);
if (god_idx == 0)
diff --git a/src/init1.cc b/src/init1.cc
index 5395ed70..9fac93c9 100644
--- a/src/init1.cc
+++ b/src/init1.cc
@@ -913,7 +913,6 @@ static int read_ability(std::vector<player_race_ability_type> *abilities, char *
errr init_player_info_txt(FILE *fp)
{
int i = 0;
- int powers = 0;
int lev = 1;
int tit_idx = 0;
char buf[1024];
@@ -1022,7 +1021,6 @@ errr init_player_info_txt(FILE *fp)
rp_ptr->title = my_strdup(s);
/* Initialize */
- powers = 0;
lev = 1;
/* Next... */
@@ -1245,7 +1243,6 @@ errr init_player_info_txt(FILE *fp)
rmp_ptr->title = s;
/* Initialize */
- powers = 0;
lev = 1;
/* Next... */
@@ -1503,7 +1500,6 @@ errr init_player_info_txt(FILE *fp)
c_ptr->title = my_strdup(s);
/* Initialize */
- powers = 0;
lev = 1;
tit_idx = 0;
@@ -1911,7 +1907,6 @@ errr init_player_info_txt(FILE *fp)
/* Append chars to the name */
strcpy(mc_ptr->name, s + 2);
mc_ptr->color = color_char_to_attr(s[0]);
- powers = 0;
/* Next... */
continue;