Skip to content

Commit 878c120

Browse files
committed
Various clang-demanded fixes
1 parent c5fefe6 commit 878c120

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

src/character.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ class Character : public Creature, public visitable
12211221

12221222
private:
12231223
double evaluate_weapon_internal( const item &maybe_weapon, bool can_use_gun,
1224-
bool use_silent, const int pretend_ammo = 0 ) const;
1224+
bool use_silent, int pretend_ammo = 0 ) const;
12251225
mutable std::optional<bool> cached_dead_state;
12261226
public:
12271227
void set_part_hp_cur( const bodypart_id &id, int set ) override;

src/npc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,6 @@ class npc : public Character
11311131
int evaluate_sleep_spot( tripoint_bub_ms p );
11321132
// Returns true if did something and we should end turn
11331133
bool scan_new_items();
1134-
public:
11351134
// Returns best weapon. Can return null (fists)
11361135
item *evaluate_best_weapon() const;
11371136
// Returns true if did wield it

src/npcmove.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,9 +4135,6 @@ bool npc::do_player_activity()
41354135

41364136
item *npc::evaluate_best_weapon() const
41374137
{
4138-
bool can_use_gun = !is_player_ally() || rules.has_flag( ally_rule::use_guns );
4139-
bool use_silent = is_player_ally() && rules.has_flag( ally_rule::use_silent );
4140-
41414138
item_location weapon = get_wielded_item();
41424139
item &weap = weapon ? *weapon : null_item_reference();
41434140

@@ -4157,7 +4154,7 @@ item *npc::evaluate_best_weapon() const
41574154
}
41584155

41594156
//Now check through the NPC's inventory for melee weapons, guns, or holstered items
4160-
visit_items( [this, can_use_gun, use_silent, &weap, &best_value, &best]( item * node, item * ) {
4157+
visit_items( [this, &weap, &best_value, &best]( item * node, item * ) {
41614158
if( can_wield( *node ).success() ) {
41624159
double weapon_value = 0.0;
41634160
bool using_same_type_bionic_weapon = is_using_bionic_weapon()

src/player_difficulty.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "character_martial_arts.h"
1212
#include "inventory.h"
1313
#include "item.h"
14-
#include "itype.h"
1514
#include "mutation.h"
1615
#include "npc_opinion.h"
1716
#include "options.h"

0 commit comments

Comments
 (0)