mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 18:49:28 +00:00
Unit: don't return const values
This commit is contained in:
parent
a832ed8b2e
commit
67335a514d
@ -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()){
|
||||||
|
@ -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.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user