summaryrefslogtreecommitdiff
path: root/wm/blackbox70/patches/patch-ab
blob: c4bc700cbbdf9b8dd0baf5e0a35559f36011abd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$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<ItemList::const_reverse_iterator, signed>
+      std::advance<ItemList::reverse_iterator, signed>
         (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);