function removeUsedCityPair(fromCity, toCity) {
for (local i = m_nearCityPairArray.len() - 1 ; i >= 0; --i) {
if (m_nearCityPairArray[i].isEqual(fromCity, toCity)) {
m_nearCityPairArray.remove(i);
}
}
local removeList = AIList();
for (local u = m_usedCities.Begin(); m_usedCities.HasNext(); m_usedCities.Next()) {
local removeTown = true;
for (local i = 0; i < m_nearCityPairArray.len(); ++i) {
if (u == m_nearCityPairArray[i].m_cityFrom || u == m_nearCityPairArray[i].m_cityTo) {
removeTown = false;
}
}
if (removeTown) {
AILog.Info("Town " + AITown.GetName(u) + " is being removed (removeUsedCityPair)");
removeTown.AddItem(u);
}
}
m_usedCities.RemoveList(removeList);
}