diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/Container.cc | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.16: | 2 | Changes 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 | ||