From 330118ee273f0184fc743ec9ef5a0203c7d08ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 5 Apr 2012 03:00:10 +0200 Subject: [PATCH] Fix zone tool --- plugins/zone.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/zone.cpp b/plugins/zone.cpp index 5e712510c..e39141b5b 100644 --- a/plugins/zone.cpp +++ b/plugins/zone.cpp @@ -799,12 +799,12 @@ df::unit * findFreeEgglayer() bool unassignUnitFromZone(df::unit* unit) { bool success = false; - for (size_t or = 0; or < unit->refs.size(); or++) + for (std::size_t idx = 0; idx < unit->refs.size(); idx++) { - df::general_ref * oldref = unit->refs[or]; + df::general_ref * oldref = unit->refs[idx]; if(oldref->getType() == df::general_ref_type::BUILDING_CIVZONE_ASSIGNED) { - unit->refs.erase(unit->refs.begin() + or); + unit->refs.erase(unit->refs.begin() + idx); df::building_civzonest * oldciv = (df::building_civzonest *) oldref->getBuilding(); for(size_t oc=0; ocassigned_creature.size(); oc++) {