summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-02-21 16:19:49 -0500
committerNeil Moore <neil@s-z.org>2013-02-21 17:49:21 -0500
commit1be813ee8cc8db99c4b62640beada2bdb59cc46d (patch)
tree768b83f1e60169bbdc7909bdacb68940036d61f0 /crawl-ref/source/menu.cc
parenta9265854a996268dcc3d0128fd9c65c9005e3769 (diff)
downloadcrawl-ref-1be813ee8cc8db99c4b62640beada2bdb59cc46d.tar.gz
crawl-ref-1be813ee8cc8db99c4b62640beada2bdb59cc46d.zip
Remove a number of dead assignments (SLi).
In the case in spl-data.cc, the comment made it sound like the line was supposed to set min_dist instead of the dead variable dist. However, we could only reach this code path if min_dist == dist, so that assignment wouldn't do anything anyway. I left a few reported dead assignments that I think make the code more maintainable.
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r--crawl-ref/source/menu.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index e99134d4d9..3de382bf3e 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -837,13 +837,11 @@ void Menu::select_items(int key, int qty)
if (check_preselected && items[i]->preselected)
{
select_index(i, qty);
- selected = true;
break;
}
else if (is_hotkey(i, key))
{
select_index(i, qty);
- selected = true;
break;
}
}