Debian Codegraph @

debian/patches/allocate

raw
1 From: Ludovic Rousseau <[email protected]>
2 Subject: fix FTBFS #1143673
3 Use the C++20 version of allocate()
4 Last-Update: 2026-08-23
5 Forwarded: https://github.com/libofx/libofx/pull/106
6
7 --- a/lib/tree.hh
8 +++ b/lib/tree.hh
9 @@ -467,8 +467,8 @@
10 template <class T, class tree_node_allocator>
11 void tree<T, tree_node_allocator>::head_initialise_()
12 {
13 - head = alloc_.allocate(1, 0); // MSVC does not have default second argument
14 - feet = alloc_.allocate(1, 0);
15 + head = alloc_.allocate(1);
16 + feet = alloc_.allocate(1);
17
18 head->parent = 0;
19 head->first_child = 0;
20 @@ -743,7 +743,7 @@
21 {
22 assert(position.node != head);
23
24 - tree_node* tmp = alloc_.allocate(1, 0);
25 + tree_node* tmp = alloc_.allocate(1);
26 kp::constructor(&tmp->data);
27 tmp->first_child = 0;
28 tmp->last_child = 0;
29 @@ -773,7 +773,7 @@
30 // the API change.
31 assert(position.node != head);
32
33 - tree_node* tmp = alloc_.allocate(1, 0);
34 + tree_node* tmp = alloc_.allocate(1);
35 kp::constructor(&tmp->data, x);
36 tmp->first_child = 0;
37 tmp->last_child = 0;
38 @@ -833,7 +833,7 @@
39 position.node = feet; // Backward compatibility: when calling insert on a null node,
40 // insert before the feet.
41 }
42 - tree_node* tmp = alloc_.allocate(1, 0);
43 + tree_node* tmp = alloc_.allocate(1);
44 kp::constructor(&tmp->data, x);
45 tmp->first_child = 0;
46 tmp->last_child = 0;
47 @@ -856,7 +856,7 @@
48 template <class T, class tree_node_allocator>
49 typename tree<T, tree_node_allocator>::sibling_iterator tree<T, tree_node_allocator>::insert(sibling_iterator position, const T& x)
50 {
51 - tree_node* tmp = alloc_.allocate(1, 0);
52 + tree_node* tmp = alloc_.allocate(1);
53 kp::constructor(&tmp->data, x);
54 tmp->first_child = 0;
55 tmp->last_child = 0;
56 @@ -889,7 +889,7 @@
57 template <class iter>
58 iter tree<T, tree_node_allocator>::insert_after(iter position, const T& x)
59 {
60 - tree_node* tmp = alloc_.allocate(1, 0);
61 + tree_node* tmp = alloc_.allocate(1);
62 kp::constructor(&tmp->data, x);
63 tmp->first_child = 0;
64 tmp->last_child = 0;
65 @@ -951,7 +951,7 @@
66
67 // replace the node at position with head of the replacement tree at from
68 erase_children(position);
69 - tree_node* tmp = alloc_.allocate(1, 0);
70 + tree_node* tmp = alloc_.allocate(1);
71 kp::constructor(&tmp->data, (*from));
72 tmp->first_child = 0;
73 tmp->last_child = 0;