summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgn-labyrinth.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-13 16:39:05 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-15 21:03:43 +0100
commitcede7d61d912750e3bd04ef9d54f3ffd63fb308f (patch)
tree49c3bf8553811a790fbf991aee59448c99d9baad /crawl-ref/source/dgn-labyrinth.cc
parent1eb5ba87ee17c68aa806a7df4ce309b84829a593 (diff)
downloadcrawl-ref-cede7d61d912750e3bd04ef9d54f3ffd63fb308f.tar.gz
crawl-ref-cede7d61d912750e3bd04ef9d54f3ffd63fb308f.zip
Don't allocate pointless iterators.
map or set.count() can test the presence of a given key and return 0 or 1 outright.
Diffstat (limited to 'crawl-ref/source/dgn-labyrinth.cc')
-rw-r--r--crawl-ref/source/dgn-labyrinth.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/dgn-labyrinth.cc b/crawl-ref/source/dgn-labyrinth.cc
index 48c8a47c78..d0ff7464e1 100644
--- a/crawl-ref/source/dgn-labyrinth.cc
+++ b/crawl-ref/source/dgn-labyrinth.cc
@@ -244,7 +244,7 @@ static void _place_extra_lab_minivaults()
while (true)
{
const map_def *vault = random_map_for_tag("lab", false);
- if (!vault || vaults_used.find(vault) != vaults_used.end())
+ if (!vault || vaults_used.count(vault))
break;
vaults_used.insert(vault);