summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-08-01 16:09:16 -0400
committerNeil Moore <neil@s-z.org>2012-08-01 17:08:37 -0400
commit1cc90225baf47270bbe2a22c1ecbbc839eaa2b90 (patch)
treebd8816720989c3d2193ccaa82cbca5f7b6f2deca /crawl-ref/source/menu.cc
parenta0a9240421e89e77aac6011671931521d7e60f0a (diff)
downloadcrawl-ref-1cc90225baf47270bbe2a22c1ecbbc839eaa2b90.tar.gz
crawl-ref-1cc90225baf47270bbe2a22c1ecbbc839eaa2b90.zip
Massive style fix (braces, indentation, etc.)
Diffstat (limited to 'crawl-ref/source/menu.cc')
-rw-r--r--crawl-ref/source/menu.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index de1dbc1775..ce0a28e41c 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -3495,18 +3495,17 @@ bool MenuFreeform::select_item(MenuItem* item)
bool MenuFreeform::attach_item(MenuItem* item)
{
// is the item inside boundaries?
- if (item->get_min_coord().x < m_min_coord.x
- || item->get_min_coord().x > m_max_coord.x)
- return false;
- if (item->get_min_coord().y < m_min_coord.y
- || item->get_min_coord().y > m_max_coord.y)
- return false;
- if (item->get_max_coord().x < m_min_coord.x
- || item->get_max_coord().x > m_max_coord.x)
- return false;
- if (item->get_max_coord().y < m_min_coord.y
+ if ( item->get_min_coord().x < m_min_coord.x
+ || item->get_min_coord().x > m_max_coord.x
+ || item->get_min_coord().y < m_min_coord.y
+ || item->get_min_coord().y > m_max_coord.y
+ || item->get_max_coord().x < m_min_coord.x
+ || item->get_max_coord().x > m_max_coord.x
+ || item->get_max_coord().y < m_min_coord.y
|| item->get_max_coord().y > m_max_coord.y)
+ {
return false;
+ }
// It's inside boundaries
m_entries.push_back(item);
@@ -4025,8 +4024,7 @@ void MenuScroller::_place_items()
if (m_currently_active < 0)
break; // all space allocated
if (one_past_last > m_currently_active)
- /// we included our active one, ok!
- break;
+ break; // we included our active one, ok!
else
{
// active one didn't fit, chop the first one and run the loop