tunit_attack: make name string not a reference

This commit is contained in:
Charles Dang 2016-01-11 05:26:36 +11:00
parent 8e31bebd87
commit 6d48f1c805

View file

@ -102,7 +102,7 @@ set_label(twindow& window, const std::string& id, const std::string& label)
static std::string format_stats(const unit& u)
{
const std::string& name = "<span size='large'>" + (!u.name().empty() ? u.name() : " ") + "</span>";
const std::string name = "<span size='large'>" + (!u.name().empty() ? u.name() : " ") + "</span>";
std::string traits;
BOOST_FOREACH(const std::string& trait, u.get_traits_list()) {