Fix a Visual Studio compiler warning
Two variables called "name" were in scope simultaneously and one shadowed the other.
This commit is contained in:
parent
d64dafc500
commit
671f32aa62
1 changed files with 2 additions and 3 deletions
|
@ -274,10 +274,9 @@ namespace {
|
|||
*/
|
||||
bool add_ability_tooltip(const config::any_child &ab, unit_race::GENDER gender, std::vector<std::tuple<std::string, t_string,t_string,t_string>>& res, bool active)
|
||||
{
|
||||
const t_string& name =
|
||||
gender_value(ab.cfg, gender, "name", "female_name", "name").t_str();
|
||||
|
||||
if (active) {
|
||||
const t_string& name = gender_value(ab.cfg, gender, "name", "female_name", "name").t_str();
|
||||
|
||||
if (!name.empty()) {
|
||||
res.emplace_back(
|
||||
ab.cfg["id"],
|
||||
|
|
Loading…
Add table
Reference in a new issue