diff --git a/src/character.h b/src/character.h index cc62b58920ee0..e143007b7aff3 100644 --- a/src/character.h +++ b/src/character.h @@ -1397,7 +1397,7 @@ class Character : public Creature, public visitable /** This is to prevent clang complaining about overloading a virtual function, the creature version uses monster flags so confusion is unlikely. */ using Creature::has_flag; /** Returns true if player has a trait, bionic, effect, bodypart, or martial arts buff with a flag */ - bool has_flag( const json_character_flag &flag ) const; + bool has_flag( const json_character_flag &flag ) const override; /** Returns the count of traits, bionics, effects, bodyparts, and martial arts buffs with a flag */ int count_flag( const json_character_flag &flag ) const; diff --git a/src/monster.h b/src/monster.h index 7ba1a4e2dede2..c29b0a892d1fc 100644 --- a/src/monster.h +++ b/src/monster.h @@ -167,7 +167,7 @@ class monster : public Creature bool has_flag( const mon_flag_id &f ) const final; // Evaluates monster for both JSON and monster flags (converted to mon_flag_id) using Creature::has_flag; - bool has_flag( const flag_id &f ) const; + bool has_flag( const flag_id &f ) const override; bool can_see() const; // MF_SEES and no MF_BLIND bool can_hear() const; // MF_HEARS and no MF_DEAF bool can_submerge() const; // MF_AQUATIC or swims() or MF_NO_BREATH, and not MF_ELECTRONIC