aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-16 17:06:52 (GMT)
committerfluxgen <fluxgen>2003-12-16 17:06:52 (GMT)
commit72b878f78c0df0a54cf8e9f04bb2e22dd6715658 (patch)
tree2bd5252fe426875a8bb7ba77b61eeff695ee3c62 /src/FbTk/Menu.cc
parenta1930dbf6ae447e92a8dc063ab5d36057ae1babc (diff)
downloadfluxbox-72b878f78c0df0a54cf8e9f04bb2e22dd6715658.zip
fluxbox-72b878f78c0df0a54cf8e9f04bb2e22dd6715658.tar.bz2
fixed some icc warnings
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 7bc6030..2ef5793 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.48 2003/12/12 21:47:36 fluxgen Exp $ 25// $Id: Menu.cc,v 1.49 2003/12/16 17:06:51 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -404,10 +404,8 @@ void Menu::update(int active_index) {
404 menu.persub = 0; 404 menu.persub = 0;
405 } 405 }
406 406
407 menu.frame_h = (menu.item_h * menu.persub); 407 int itmp = (menu.item_h * menu.persub);
408 if (menu.frame_h < 0) 408 menu.frame_h = itmp < 0 ? 0 : itmp;
409 menu.frame_h = 0;
410
411 409
412 int new_width = (menu.sublevels * menu.item_w); 410 int new_width = (menu.sublevels * menu.item_w);
413 int new_height = menu.frame_h; 411 int new_height = menu.frame_h;
@@ -1229,7 +1227,7 @@ void Menu::exposeEvent(XExposeEvent &ee) {
1229 for (i = sbl; i <= sbl_d; i++) { 1227 for (i = sbl; i <= sbl_d; i++) {
1230 // set the iterator to the first item in the sublevel needing redrawing 1228 // set the iterator to the first item in the sublevel needing redrawing
1231 unsigned int index = id + i * menu.persub; 1229 unsigned int index = id + i * menu.persub;
1232 if (index < static_cast<int>(menuitems.size()) && index >= 0) { 1230 if (index < static_cast<int>(menuitems.size())) {
1233 Menuitems::iterator it = menuitems.begin() + index; 1231 Menuitems::iterator it = menuitems.begin() + index;
1234 Menuitems::iterator it_end = menuitems.end(); 1232 Menuitems::iterator it_end = menuitems.end();
1235 for (ii = id; ii <= id_d && it != it_end; ++it, ii++) { 1233 for (ii = id; ii <= id_d && it != it_end; ++it, ii++) {
@@ -1351,8 +1349,6 @@ void Menu::reconfigure() {
1351 1349
1352 if (menu.bevel_w > 10) // clamp to "normal" size 1350 if (menu.bevel_w > 10) // clamp to "normal" size
1353 menu.bevel_w = 10; 1351 menu.bevel_w = 10;
1354 if (menu.bevel_w < 0)
1355 menu.bevel_w = 1;
1356 1352
1357 if (m_border_width > 20) // clamp to normal size 1353 if (m_border_width > 20) // clamp to normal size
1358 m_border_width = 20; 1354 m_border_width = 20;