]> Dogcows Code - chaz/openbox/blobdiff - src/Basemenu.cc
removing old Makefile.in, rolling back Makefile.am to before the mappable muse button...
[chaz/openbox] / src / Basemenu.cc
index fa2f4b0060185bca1b0a2e6320dc9199c0585ddd..7358df3c3a6c814791ed62416a4b67cf89d788f4 100644 (file)
@@ -40,6 +40,7 @@ extern "C" {
 }
 
 #include <algorithm>
+#include <assert.h>
 using namespace std;
 
 #include "i18n.hh"
@@ -200,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];
 }
 
 
@@ -592,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;
 
This page took 0.020765 seconds and 4 git commands to generate.