summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commit558dcb71fda502cd32f7ba3bae4623f1f0cfa20f (patch)
tree8b4c5b4aa0b4cf7352682f88f2beba44647ed187
parent8409efc6bcc6aa6a43a1aa35aec68e8797239e62 (diff)
Apply clang-tidy misc-unused-parameters fix
-rw-r--r--src/birth.cc4
-rw-r--r--src/cmd1.cc9
-rw-r--r--src/cmd2.cc16
-rw-r--r--src/cmd6.cc6
-rw-r--r--src/melee2.cc4
-rw-r--r--src/wild.cc20
-rw-r--r--src/xtra2.cc8
-rw-r--r--src/z-rand.cc6
8 files changed, 36 insertions, 37 deletions
diff --git a/src/birth.cc b/src/birth.cc
index cf2c3ab6..c29f7eed 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -268,7 +268,7 @@ static void load_prev_data(bool save)
*
* The "p_ptr->maximize" code is important -BEN-
*/
-static int adjust_stat(int value, int amount, int auto_roll)
+static int adjust_stat(int value, int amount)
{
int i;
@@ -2292,7 +2292,7 @@ static bool player_birth_aux_auto()
j = rp_ptr->ps.adj[i] + rmp_ptr->ps.adj[i] + cp_ptr->ps.adj[i];
/* Obtain the "maximal" stat */
- m = adjust_stat(17, j, true);
+ m = adjust_stat(17, j);
/* Save the maximum */
diff --git a/src/cmd1.cc b/src/cmd1.cc
index d6de677e..8256f8fd 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -514,7 +514,7 @@ static void touch_zap_player(monster_type *m_ptr)
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void carried_monster_attack(s16b m_idx, bool *mdeath, int x, int y)
+static void carried_monster_attack(s16b m_idx, int x, int y)
{
auto const &r_info = game->edit_data.r_info;
@@ -1009,8 +1009,7 @@ static void carried_monster_attack(s16b m_idx, bool *mdeath, int x, int y)
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void incarnate_monster_attack(s16b m_idx, bool *mdeath,
- int x, int y)
+static void incarnate_monster_attack(s16b m_idx, int x, int y)
{
auto const &r_info = game->edit_data.r_info;
@@ -1990,7 +1989,7 @@ void py_attack(int y, int x, int max_blow)
(!r_info[p_ptr->body_monster].body_parts[BODY_WEAPON]) &&
!(p_ptr->melee_style == SKILL_HAND))
{
- incarnate_monster_attack(c_ptr->m_idx, &mdeath, y, x);
+ incarnate_monster_attack(c_ptr->m_idx, y, x);
}
/* Otherwise use your weapon(s) */
else
@@ -2419,7 +2418,7 @@ void py_attack(int y, int x, int max_blow)
/* Carried monster can attack too */
if ((!mdeath) && m_list[c_ptr->m_idx].hp)
{
- carried_monster_attack(c_ptr->m_idx, &mdeath, y, x);
+ carried_monster_attack(c_ptr->m_idx, y, x);
}
/* Hack -- delay fear messages */
diff --git a/src/cmd2.cc b/src/cmd2.cc
index 958e9784..8318e370 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -664,7 +664,7 @@ static int coords_to_dir(int y, int x)
*
* Returns true if repeated commands may continue
*/
-static bool do_cmd_open_aux(int y, int x, int dir)
+static bool do_cmd_open_aux(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
@@ -857,7 +857,7 @@ void do_cmd_open()
else
{
/* Open the door */
- more = do_cmd_open_aux(y, x, dir);
+ more = do_cmd_open_aux(y, x);
}
}
@@ -876,7 +876,7 @@ void do_cmd_open()
*
* Returns true if repeated commands may continue
*/
-static bool do_cmd_close_aux(int y, int x, int dir)
+static bool do_cmd_close_aux(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
@@ -1005,7 +1005,7 @@ void do_cmd_close()
else
{
/* Close the door */
- more = do_cmd_close_aux(y, x, dir);
+ more = do_cmd_close_aux(y, x);
}
}
@@ -1099,7 +1099,7 @@ static bool twall(int y, int x, byte feat)
*
* Returns true if repeated commands may continue
*/
-static bool do_cmd_tunnel_aux(int y, int x, int dir)
+static bool do_cmd_tunnel_aux(int y, int x)
{
auto const &d_info = game->edit_data.d_info;
auto const &f_info = game->edit_data.f_info;
@@ -1434,7 +1434,7 @@ void do_cmd_tunnel()
else
{
/* Tunnel through walls */
- more = do_cmd_tunnel_aux(y, x, dir);
+ more = do_cmd_tunnel_aux(y, x);
}
}
@@ -1706,14 +1706,14 @@ void do_cmd_alter()
(c_ptr->feat <= FEAT_DOOR_TAIL))
{
/* Tunnel */
- more = do_cmd_open_aux(y, x, dir);
+ more = do_cmd_open_aux(y, x);
}
/* Tunnel through walls */
else if (f_info[c_ptr->feat].flags & FF_TUNNELABLE)
{
/* Tunnel */
- more = do_cmd_tunnel_aux(y, x, dir);
+ more = do_cmd_tunnel_aux(y, x);
}
/* Oops */
diff --git a/src/cmd6.cc b/src/cmd6.cc
index 9bb1cc36..86b5faeb 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -1703,7 +1703,7 @@ static object_filter_t const &item_tester_hook_quaffable()
}
-static void quaff_potion(int tval, int sval, int pval, int pval2)
+static void quaff_potion(int tval, int sval, int pval2)
{
/* "Traditional" potions */
if (tval == TV_POTION)
@@ -2322,7 +2322,7 @@ void do_cmd_quaff_potion()
else
{
/* Normal potion handling */
- quaff_potion(o_ptr->tval, o_ptr->sval, o_ptr->pval, o_ptr->pval2);
+ quaff_potion(o_ptr->tval, o_ptr->sval, o_ptr->pval2);
}
/* Combine / Reorder the pack (later) */
@@ -2478,7 +2478,7 @@ void do_cmd_drink_fountain()
break;
}
- quaff_potion(tval, sval, pval, 0);
+ quaff_potion(tval, sval, 0);
c_ptr->special2--;
diff --git a/src/melee2.cc b/src/melee2.cc
index 67d7d844..087d2b27 100644
--- a/src/melee2.cc
+++ b/src/melee2.cc
@@ -5250,7 +5250,7 @@ static bool player_invis(monster_type * m_ptr)
*
* A "direction" of "5" means "pick a random direction".
*/
-static void process_monster(int m_idx, bool is_frien)
+static void process_monster(int m_idx)
{
auto const &f_info = game->edit_data.f_info;
@@ -6512,7 +6512,7 @@ void process_monsters()
if (is_friend(m_ptr) > 0) is_frien = true;
/* Process the monster */
- process_monster(i, is_frien);
+ process_monster(i);
/* Hack -- notice death or departure */
if (!alive || death) break;
diff --git a/src/wild.cc b/src/wild.cc
index 9de0f371..24ffe4d0 100644
--- a/src/wild.cc
+++ b/src/wild.cc
@@ -154,7 +154,7 @@ static void plasma_recursive(int x1, int y1, int x2, int y2,
*
* Return the number of floor grids
*/
-static int generate_area(int y, int x, bool border, bool corner)
+static int generate_area(int y, int x, bool corner)
{
auto const &wilderness = game->wilderness;
auto const &wf_info = game->edit_data.wf_info;
@@ -397,7 +397,7 @@ void wilderness_gen()
get_mon_num_prep();
/* North border */
- generate_area(y - 1, x, true, false);
+ generate_area(y - 1, x, false);
for (i = 1; i < MAX_WID - 1; i++)
{
@@ -405,7 +405,7 @@ void wilderness_gen()
}
/* South border */
- generate_area(y + 1, x, true, false);
+ generate_area(y + 1, x, false);
for (i = 1; i < MAX_WID - 1; i++)
{
@@ -413,7 +413,7 @@ void wilderness_gen()
}
/* West border */
- generate_area(y, x - 1, true, false);
+ generate_area(y, x - 1, false);
for (i = 1; i < MAX_HGT - 1; i++)
{
@@ -421,7 +421,7 @@ void wilderness_gen()
}
/* East border */
- generate_area(y, x + 1, true, false);
+ generate_area(y, x + 1, false);
for (i = 1; i < MAX_HGT - 1; i++)
{
@@ -429,24 +429,24 @@ void wilderness_gen()
}
/* North west corner */
- generate_area(y - 1, x - 1, false, true);
+ generate_area(y - 1, x - 1, true);
border.north_west = cave[MAX_HGT - 2][MAX_WID - 2].feat;
/* North east corner */
- generate_area(y - 1, x + 1, false, true);
+ generate_area(y - 1, x + 1, true);
border.north_east = cave[MAX_HGT - 2][1].feat;
/* South west corner */
- generate_area(y + 1, x - 1, false, true);
+ generate_area(y + 1, x - 1, true);
border.south_west = cave[1][MAX_WID - 2].feat;
/* South east corner */
- generate_area(y + 1, x + 1, false, true);
+ generate_area(y + 1, x + 1, true);
border.south_east = cave[1][1].feat;
/* Create terrain of the current area */
- hack_floor = generate_area(y, x, false, false);
+ hack_floor = generate_area(y, x, false);
/* Special boundary walls -- North */
diff --git a/src/xtra2.cc b/src/xtra2.cc
index 97bdca34..a0f87d02 100644
--- a/src/xtra2.cc
+++ b/src/xtra2.cc
@@ -2199,7 +2199,7 @@ static bool monster_race_in_list_p(monster_type *m_ptr, const char *races[])
/*
* Handle the "death" of a monster (Gods)
*/
-static void monster_death_gods(int m_idx, monster_type *m_ptr)
+static void monster_death_gods(monster_type *m_ptr)
{
if (p_ptr->pgod == GOD_AULE)
{
@@ -2423,7 +2423,7 @@ void monster_death(int m_idx)
}
/* Per-god processing */
- monster_death_gods(m_idx, m_ptr);
+ monster_death_gods(m_ptr);
/* If companion dies, take note */
if (m_ptr->status == MSTATUS_COMPANION) p_ptr->companion_killed++;
@@ -4991,7 +4991,7 @@ void set_grace(s32b v)
handle_stuff();
}
-static bool test_object_wish(char *name, object_type *o_ptr, object_type *forge, const char *what)
+static bool test_object_wish(char *name, object_type *o_ptr, object_type *forge)
{
auto &k_info = game->edit_data.k_info;
auto const &e_info = game->edit_data.e_info;
@@ -5178,7 +5178,7 @@ void make_wish()
return;
}
- if (test_object_wish(name, o_ptr, &forge, "wish"))
+ if (test_object_wish(name, o_ptr, &forge))
{
msg_print("Your wish becomes truth!");
diff --git a/src/z-rand.cc b/src/z-rand.cc
index 42e93547..f5f10066 100644
--- a/src/z-rand.cc
+++ b/src/z-rand.cc
@@ -24,7 +24,7 @@ using rng_t = pcg64_once_insecure;
/**
* Reseed the given RNG.
*/
-static void reseed_rng(rng_t *rng, seed_t const &seed)
+static void reseed_rng(rng_t *rng)
{
assert(rng != nullptr);
// Create a seed_seq from the seed data.
@@ -43,7 +43,7 @@ static void reseed_rng(rng_t *rng, seed_t const &seed)
static rng_t *new_seeded_rng(seed_t const &seed)
{
rng_t *rng = new rng_t;
- reseed_rng(rng, seed);
+ reseed_rng(rng);
return rng;
}
@@ -91,7 +91,7 @@ static rng_t *get_current_rng()
void set_quick_rng(seed_t const &seed)
{
- reseed_rng(quick_rng(), seed);
+ reseed_rng(quick_rng());
current_rng = quick_rng();
}