diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-06-21 01:06:29 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-06-21 01:06:29 +0000 |
| commit | 1766453ca2ce30adf84798cb504e8b4d258bd08f (patch) | |
| tree | 0f667ab5a3f22293926965086258f98e09e42c46 /src/Basemenu.cc | |
| parent | 8941da8e41d15ae6729c04b2933d74869c25e857 (diff) | |
sync with blackbox-cvs
Diffstat (limited to 'src/Basemenu.cc')
| -rw-r--r-- | src/Basemenu.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Basemenu.cc b/src/Basemenu.cc index 575147e6..7358df3c 100644 --- a/src/Basemenu.cc +++ b/src/Basemenu.cc @@ -201,14 +201,11 @@ Basemenu::~Basemenu(void) { } -BasemenuItem::~BasemenuItem(void) {} - - BasemenuItem *Basemenu::find(int index) { - if (index < 0 || index > static_cast<signed>(menuitems.size())) + if (index < 0 || index >= static_cast<signed>(menuitems.size())) return (BasemenuItem*) 0; - return *(menuitems.begin() + index); + return menuitems[index]; } @@ -593,8 +590,7 @@ bool Basemenu::hasSubmenu(int index) { void Basemenu::drawItem(int index, bool highlight, bool clear, - int x, int y, unsigned int w, unsigned int h) -{ + int x, int y, unsigned int w, unsigned int h) { BasemenuItem *item = find(index); if (! item) return; |
