diff options
author | Eric Anholt <eric@anholt.net> | 2010-04-07 11:46:26 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-04-08 11:24:06 -0700 |
commit | cad9766118d269725ef33b4e9588d674d5225010 (patch) | |
tree | 41226eeade127594a93b3f4780d9da9dd026b2eb /list.h | |
parent | b427c917ce47675b102fac3ddace883629ff6be8 (diff) |
Inline functions consisting of a return of an expression.
Diffstat (limited to 'list.h')
-rw-r--r-- | list.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -126,6 +126,17 @@ struct exec_node { this->next->prev = after; this->next = after; } + /** + * Insert a node in the list before the current node + */ + void insert_before(exec_node *before) + { + before->next = this; + before->prev = this->prev; + + this->prev->next = before; + this->prev = before; + } #endif }; |