diff options
author | simonb <simonb> | 2006-04-15 16:46:37 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-15 16:46:37 (GMT) |
commit | 02aa83a59eb3d9e209449b38808635f9e293a17a (patch) | |
tree | 60bde408a59c51e5abc3fd266f2ed3ae68fa2e72 | |
parent | 7c7908443302fc66929e19804f0fbd655d4c7f34 (diff) | |
download | fluxbox_pavel-02aa83a59eb3d9e209449b38808635f9e293a17a.zip fluxbox_pavel-02aa83a59eb3d9e209449b38808635f9e293a17a.tar.bz2 |
signedness fix
-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 | ||