mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 23:14:27 +00:00
Simplified code by removing string casts.
This commit is contained in:
parent
997731d771
commit
daa3bddf28
@ -2256,7 +2256,7 @@ WML_HANDLER_FUNCTION(store_starting_location, /*event_info*/, cfg)
|
||||
resources::game_map->write_terrain(loc, loc_store);
|
||||
if (resources::game_map->is_village(loc)) {
|
||||
int side = village_owner(loc, *resources::teams) + 1;
|
||||
loc_store["owner_side"] = str_cast(side);
|
||||
loc_store["owner_side"] = side;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2295,7 +2295,7 @@ WML_HANDLER_FUNCTION(store_villages, /*event_info*/, cfg)
|
||||
j->write(loc_store);
|
||||
resources::game_map->write_terrain(*j, loc_store);
|
||||
int side = village_owner(*j, *resources::teams) + 1;
|
||||
loc_store["owner_side"] = str_cast(side);
|
||||
loc_store["owner_side"] = side;
|
||||
}
|
||||
}
|
||||
varinfo.vars->clear_children(varinfo.key);
|
||||
@ -2322,7 +2322,7 @@ WML_HANDLER_FUNCTION(store_locations, /*event_info*/, cfg)
|
||||
resources::game_map->write_terrain(*j, loc_store);
|
||||
if (resources::game_map->is_village(*j)) {
|
||||
int side = village_owner(*j, *resources::teams) + 1;
|
||||
loc_store["owner_side"] = str_cast(side);
|
||||
loc_store["owner_side"] = side;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user