summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 7baa51eb3f..bc66d16e9b 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -7841,7 +7841,7 @@ static void _add_plant_clumps()
}
/* make sure the iterator stays valid */
- to_place.reserve((2 * i + 1) * (2 * i + 1));
+ std::vector<coord_def> more_to_place;
for (std::vector<coord_def>::const_iterator it = to_place.begin();
it != to_place.end();
++it)
@@ -7854,10 +7854,11 @@ static void _add_plant_clumps()
if (abs(rad->x - it->x) <= 1 && abs(rad->y - it->y) <= 1)
{
if (one_chance_in(12)) {
- to_place.push_back(*rad);
+ more_to_place.push_back(*rad);
}
}
}
+ to_place.insert(to_place.end(), more_to_place.begin(), more_to_place.end());
}
}