Commit aafbb6c
committed
Refactor list node to support embedded usage
Remove the data member from list_node to support an embedded-node design.
List nodes are now embedded directly into container structures, eliminating
the need to manage list node lifecycles during pushback or remove operations.
The lifecycle is instead owned by the container itself.
This change updates existing list helpers to align with the embedded design
and reduces unnecessary memory operations during list manipulation.1 parent 5d0291f commit aafbb6c
1 file changed
+9
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| |||
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
81 | | - | |
| 78 | + | |
82 | 79 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 80 | + | |
88 | 81 | | |
89 | 82 | | |
90 | | - | |
91 | 83 | | |
92 | 84 | | |
93 | 85 | | |
| |||
100 | 92 | | |
101 | 93 | | |
102 | 94 | | |
103 | | - | |
| 95 | + | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
108 | 100 | | |
109 | 101 | | |
| 102 | + | |
110 | 103 | | |
111 | | - | |
112 | | - | |
113 | 104 | | |
114 | | - | |
| 105 | + | |
115 | 106 | | |
116 | 107 | | |
117 | | - | |
118 | | - | |
| 108 | + | |
| 109 | + | |
119 | 110 | | |
120 | 111 | | |
121 | 112 | | |
| |||
128 | 119 | | |
129 | 120 | | |
130 | 121 | | |
131 | | - | |
132 | | - | |
| 122 | + | |
133 | 123 | | |
134 | | - | |
| 124 | + | |
135 | 125 | | |
136 | 126 | | |
137 | 127 | | |
| |||
0 commit comments