summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/Menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Servers/WindowServer/Menu.cpp')
-rw-r--r--Servers/WindowServer/Menu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Servers/WindowServer/Menu.cpp b/Servers/WindowServer/Menu.cpp
index 56874ce210..779012b8ec 100644
--- a/Servers/WindowServer/Menu.cpp
+++ b/Servers/WindowServer/Menu.cpp
@@ -403,7 +403,7 @@ void Menu::event(Core::Event& event)
--m_hovered_item_index;
} while (hovered_item()->type() == MenuItem::Separator);
- ASSERT(m_hovered_item_index >= 0 && m_hovered_item_index <= m_items.size() - 1);
+ ASSERT(m_hovered_item_index >= 0 && m_hovered_item_index <= static_cast<int>(m_items.size()) - 1);
if (is_scrollable() && m_hovered_item_index < m_scroll_offset)
--m_scroll_offset;
@@ -415,17 +415,17 @@ void Menu::event(Core::Event& event)
if (key == Key_Down) {
ASSERT(m_items.at(0).type() != MenuItem::Separator);
- if (is_scrollable() && m_hovered_item_index == m_items.size() - 1)
+ if (is_scrollable() && m_hovered_item_index == static_cast<int>(m_items.size()) - 1)
return;
do {
- if (m_hovered_item_index == m_items.size() - 1)
+ if (m_hovered_item_index == static_cast<int>(m_items.size()) - 1)
m_hovered_item_index = 0;
else
++m_hovered_item_index;
} while (hovered_item()->type() == MenuItem::Separator);
- ASSERT(m_hovered_item_index >= 0 && m_hovered_item_index <= m_items.size() - 1);
+ ASSERT(m_hovered_item_index >= 0 && m_hovered_item_index <= static_cast<int>(m_items.size()) - 1);
if (is_scrollable() && m_hovered_item_index >= (m_scroll_offset + visible_item_count()))
++m_scroll_offset;