Skip to content

Commit

Permalink
moves alignment_str() to header and correct documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
newfrenchy83 authored and Pentarctagon committed Nov 5, 2024
1 parent 8b0909b commit 82cc6d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/units/attack_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ attack_type::attack_type(const config& cfg)
}
}

std::string attack_type::alignment_str() const
{
return alignment_ ? unit_alignments::get_string(*alignment()) : "";
}

std::string attack_type::accuracy_parry_description() const
{
if(accuracy_ == 0 && parry_ == 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/units/attack_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ class attack_type : public std::enable_shared_from_this<attack_type>
std::string weapon_specials() const;
std::string weapon_specials_value(const std::set<std::string> checking_tags) const;

/** Returns alignment specified by alignment_str_ variable If empty or not valid returns the unit's alignment or neutral if self_ variable empty.
/** Returns alignment specified by alignment_ variable.
*/
utils::optional<unit_alignments::type> alignment() const { return alignment_; }
/** Returns alignment specified by alignment() for filtering when exist.
*/
std::string alignment_str() const;
std::string alignment_str() const { return alignment_ ? unit_alignments::get_string(*alignment_) : ""; }

/** Calculates the number of attacks this weapon has, considering specials. */
void modified_attacks(unsigned & min_attacks,
Expand Down

0 comments on commit 82cc6d9

Please sign in to comment.