MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / add_front

Method add_front

Kernel/include/list.h:111–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 void add_front(const T& obj) {
112 if (!back) {
113 back = obj;
114 }
115 else if(front) {
116 front->prev = obj;
117 obj->next = front;
118 }
119 front = obj;
120 obj->prev = back;
121 num++;
122 }
123
124 T operator[](unsigned pos) {
125 return get_at(pos);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected