$NetBSD: patch-ab,v 1.1 2008/01/14 02:04:41 rillig Exp $ Sunpro has problems with a non-const const_reverse_iterator. --- lib/Menu.cc.orig 2005-01-27 18:08:22.000000000 +0100 +++ lib/Menu.cc 2007-12-05 16:08:11.094236000 +0100 @@ -1052,10 +1052,10 @@ void bt::Menu::keyPressEvent(const XKeyE } case XK_Up: { - ItemList::const_reverse_iterator anchor = _items.rbegin(); - const ItemList::const_reverse_iterator &end = _items.rend(); + ItemList::reverse_iterator anchor = _items.rbegin(); + const ItemList::reverse_iterator &end = _items.rend(); if (_active_index != ~0u) { - std::advance + std::advance (anchor, _items.size() - _active_index - 1); // go one item past the current active index @@ -1065,7 +1065,7 @@ void bt::Menu::keyPressEvent(const XKeyE if (anchor == end) anchor = _items.rbegin(); - ItemList::const_reverse_iterator it = + ItemList::reverse_iterator it = std::find_if(anchor, end, InteractMatch()); if (it != end) activateIndex(it->indx); @@ -1073,8 +1073,8 @@ void bt::Menu::keyPressEvent(const XKeyE } case XK_Home: { - const ItemList::const_iterator &end = _items.end(); - ItemList::const_iterator it = _items.begin(); + const ItemList::iterator &end = _items.end(); + ItemList::iterator it = _items.begin(); it = std::find_if(it, end, InteractMatch()); if (it != end) activateIndex(it->indx); @@ -1082,8 +1082,8 @@ void bt::Menu::keyPressEvent(const XKeyE } case XK_End: { - const ItemList::const_reverse_iterator &end = _items.rend(); - ItemList::const_reverse_iterator it = _items.rbegin(); + const ItemList::reverse_iterator &end = _items.rend(); + ItemList::reverse_iterator it = _items.rbegin(); it = std::find_if(it, end, InteractMatch()); if (it != end) activateIndex(it->indx);