Unit: don't return const values

This commit is contained in:
Charles Dang 2024-09-27 12:34:19 -04:00
parent a832ed8b2e
commit 67335a514d
2 changed files with 5 additions and 4 deletions

View File

@ -591,7 +591,7 @@ static void add_string_to_vector(std::vector<std::string>& image_list, const con
} }
} }
const std::vector<std::string> unit::halo_or_icon_abilities(const std::string& image_type) const std::vector<std::string> unit::halo_or_icon_abilities(const std::string& image_type) const
{ {
std::vector<std::string> image_list; std::vector<std::string> image_list;
for(const auto [key, cfg] : abilities_.all_children_range()){ for(const auto [key, cfg] : abilities_.all_children_range()){

View File

@ -1628,10 +1628,10 @@ public:
return halo_.value_or(""); return halo_.value_or("");
} }
const std::vector<std::string> halo_or_icon_abilities(const std::string& image_type) const; std::vector<std::string> halo_or_icon_abilities(const std::string& image_type) const;
/** Get the [halo] abilities halo image(s). */ /** Get the [halo] abilities halo image(s). */
const std::vector<std::string> halo_abilities() const std::vector<std::string> halo_abilities() const
{ {
return halo_or_icon_abilities("halo"); return halo_or_icon_abilities("halo");
} }
@ -1680,10 +1680,11 @@ public:
} }
/** Get the [overlay] ability overlay images. */ /** Get the [overlay] ability overlay images. */
const std::vector<std::string> overlays_abilities() const std::vector<std::string> overlays_abilities() const
{ {
return halo_or_icon_abilities("overlay"); return halo_or_icon_abilities("overlay");
} }
/** /**
* Color for this unit's *current* hitpoints. * Color for this unit's *current* hitpoints.
* *