summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/Container.cc4
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 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.16: 2Changes for 0.9.16:
3*06/04/16: 3*06/04/16:
4 * signedness fix in Container moveItem (thanks _markt)
5 Container.cc
4 * Vertical toolbar (Simon) 6 * Vertical toolbar (Simon)
5 Toolbar.cc ToolbarItem.hh/cc IconbarTool.hh/cc IconButton.hh/cc 7 Toolbar.cc ToolbarItem.hh/cc IconbarTool.hh/cc IconButton.hh/cc
6 ClockTool.hh/cc ButtonTool.cc WorkspaceNameTool.hh/cc Container.cc 8 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) {
129 int index = find(item); 129 int index = find(item);
130 const size_t size = m_item_list.size(); 130 const size_t size = m_item_list.size();
131 131
132 if (index < 0 || (movement % size) == 0) { 132 if (index < 0 || (movement % static_cast<signed>(size)) == 0) {
133 return; 133 return;
134 } 134 }
135 135
136 int newindex = (index + movement) % size; 136 int newindex = (index + movement) % static_cast<signed>(size);
137 if (newindex < 0) // neg wrap 137 if (newindex < 0) // neg wrap
138 newindex += size; 138 newindex += size;
139 139