Skip to content

Commit

Permalink
Fix recent clang tidy warnings (CleverRaven#50084)
Browse files Browse the repository at this point in the history
* Fix clang-tidy warning on string concatenation in learn_spell_actor::info()
* Fix clang-tidy warning on parameter name mismatch in Character::estimate_effect_dur()
Co-authored-by: eltank <8000047+eltank@users.noreply.github.com>
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
Co-authored-by: Jianxiang Wang (王健翔) <qrox@sina.com>
Co-authored-by: eltank <8000047+eltank@users.noreply.github.com>
  • Loading branch information
BrettDong committed Jul 21, 2021
1 parent 4199b64 commit d0fb1f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/character.h
Expand Up @@ -2753,7 +2753,7 @@ class Character : public Creature, public visitable
@param minimum_error Maximum error when skill is >= threshold */
time_duration estimate_effect_dur( const skill_id &relevant_skill, const efftype_id &effect,
const time_duration &error_magnitude,
const time_duration &mimimum_error, int threshold, const Creature &target ) const;
const time_duration &minimum_error, int threshold, const Creature &target ) const;

// inherited from visitable
bool has_quality( const quality_id &qual, int level = 1, int qty = 1 ) const override;
Expand Down
6 changes: 3 additions & 3 deletions src/iuse_actor.cpp
Expand Up @@ -2183,13 +2183,13 @@ void learn_spell_actor::info( const item &, std::vector<iteminfo> &dump ) const
const spell sp = pc.magic->get_spell( sp_id );
spell_text += ": " + string_format( _( "Level %u" ), sp.get_level() );
if( sp.is_max_level() ) {
spell_text = "<color_light_green>" + spell_text + _( " (Max)" ) + "</color>";
spell_text = string_format( _( "<color_light_green>%1$s (Max)</color>" ), spell_text );
} else {
spell_text = "<color_yellow>" + spell_text + "</color>";
spell_text = string_format( "<color_yellow>%s</color>", spell_text );
}
} else {
if( pc.magic->can_learn_spell( pc, sp_id ) ) {
spell_text = "<color_light_blue>" + spell_text + "</color>";
spell_text = string_format( "<color_light_blue>%s</color>", spell_text );
}
}
dump.emplace_back( "SPELL", spell_text );
Expand Down

0 comments on commit d0fb1f3

Please sign in to comment.