summaryrefslogtreecommitdiff
path: root/src/menu.h
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-09-04 23:05:41 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-09-04 23:05:58 +0200
commit5f637103a617e547e073db43420aec93e2b49f3a (patch)
treec6b70bb3add17473cf96b3c52e003a0d8c5d2dfe /src/menu.h
parentbf3a7a7715e3caa39fa512922167013a543369dd (diff)
menu: make Menu::drawn return ConstIterator
Diffstat (limited to 'src/menu.h')
-rw-r--r--src/menu.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/menu.h b/src/menu.h
index c5e9f669..60400db4 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -343,12 +343,7 @@ template <typename T> struct Menu : public Window
/// @return currently drawn item. The result is defined only within
/// drawing function that is called by Refresh()
/// @see Refresh()
- const Item &drawn() const { return *(*m_options_ptr)[m_drawn_position]; }
-
- /// @return position of currently drawn item. The result is defined
- /// only within drawing function that is called by Refresh()
- /// @see Refresh()
- size_t drawnPosition() const { return m_drawn_position; }
+ ConstIterator drawn() const { return begin() + m_drawn_position; }
/// @return reference to last item on the list
/// @throw List::InvalidItem if requested item is separator