fix some redefinition errors
http://www.wesnoth.org/wiki/CodingStandards#Respect_for_loop_scoping_of_different_platforms
This commit is contained in:
parent
d57c99fd02
commit
23f4463a6f
2 changed files with 8 additions and 6 deletions
|
@ -903,8 +903,8 @@ const unit_types_preview_pane::details unit_types_preview_pane::get_details() co
|
|||
// FIXME: not sure if it's fully accurate (but not very important for unit_type)
|
||||
// xp_color also need a simpler function for doing this
|
||||
const config::child_list& advances = t->modification_advancements();
|
||||
for(config::child_list::const_iterator i = advances.begin(); i != advances.end(); ++i) {
|
||||
if (!utils::string_bool((**i)["strict_amla"]) || !t->can_advance()) {
|
||||
for(config::child_list::const_iterator j = advances.begin(); j != advances.end(); ++j) {
|
||||
if (!utils::string_bool((**j)["strict_amla"]) || !t->can_advance()) {
|
||||
det.xp_color = "<100,0,150>"; // from unit::xp_color()
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -536,7 +536,8 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
|||
}
|
||||
|
||||
std::map<std::string,std::string> title_stash;
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
std::vector<theme::menu>::iterator m;
|
||||
for (m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (!m->title().empty() && !m->get_id().empty())
|
||||
title_stash[m->get_id()] = m->title();
|
||||
}
|
||||
|
@ -549,7 +550,7 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
|||
const config& cfg = **current;
|
||||
add_object(cfg);
|
||||
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
for (m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (title_stash.find(m->get_id()) != title_stash.end())
|
||||
m->set_title(title_stash[m->get_id()]);
|
||||
}
|
||||
|
@ -656,7 +657,8 @@ void theme::set_object_location(theme::object& element, std::string rect_str, st
|
|||
|
||||
void theme::modify(const config* cfg){
|
||||
std::map<std::string,std::string> title_stash;
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
std::vector<theme::menu>::iterator m;
|
||||
for (m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (!m->title().empty() && !m->get_id().empty())
|
||||
title_stash[m->get_id()] = m->title();
|
||||
}
|
||||
|
@ -687,7 +689,7 @@ void theme::modify(const config* cfg){
|
|||
remove_object((**j)["id"]);
|
||||
}
|
||||
}
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
for (m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (title_stash.find(m->get_id()) != title_stash.end())
|
||||
m->set_title(title_stash[m->get_id()]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue