signedness fix
simonb simonb
2 files changed,
4 insertions(+),
2 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,8 @@
(Format: Year/Month/Day) Changes for 0.9.16: *06/04/16: + * signedness fix in Container moveItem (thanks _markt) + Container.cc * Vertical toolbar (Simon) Toolbar.cc ToolbarItem.hh/cc IconbarTool.hh/cc IconButton.hh/cc ClockTool.hh/cc ButtonTool.cc WorkspaceNameTool.hh/cc Container.cc
M
src/Container.cc
→
src/Container.cc
@@ -129,11 +129,11 @@
int index = find(item); const size_t size = m_item_list.size(); - if (index < 0 || (movement % size) == 0) { + if (index < 0 || (movement % static_cast<signed>(size)) == 0) { return; } - int newindex = (index + movement) % size; + int newindex = (index + movement) % static_cast<signed>(size); if (newindex < 0) // neg wrap newindex += size;