From 1931328aa1215a5465c351d2709e6e5329bdfa57 Mon Sep 17 00:00:00 2001 From: b3brodie Date: Sat, 14 Dec 2024 01:31:47 -0800 Subject: [PATCH] add has_flag override attempt 2 --- src/character.h | 2 +- src/monster.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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