From 02aa83a59eb3d9e209449b38808635f9e293a17a Mon Sep 17 00:00:00 2001 From: simonb Date: Sat, 15 Apr 2006 16:46:37 +0000 Subject: signedness fix --- ChangeLog | 2 ++ src/Container.cc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2c5758..6fd3875 100644 --- a/ChangeLog +++ b/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 diff --git a/src/Container.cc b/src/Container.cc index bcd5464..caab11b 100644 --- a/src/Container.cc +++ b/src/Container.cc @@ -129,11 +129,11 @@ void Container::moveItem(Item item, int movement) { int index = find(item); const size_t size = m_item_list.size(); - if (index < 0 || (movement % size) == 0) { + if (index < 0 || (movement % static_cast(size)) == 0) { return; } - int newindex = (index + movement) % size; + int newindex = (index + movement) % static_cast(size); if (newindex < 0) // neg wrap newindex += size; -- cgit v0.11.2