projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5312080
)
exec_list: Add a new replace_with method.
author
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 14 Jul 2010 19:14:26 +0000
(12:14 -0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 14 Jul 2010 23:49:24 +0000
(16:49 -0700)
src/glsl/list.h
patch
|
blob
|
history
diff --git
a/src/glsl/list.h
b/src/glsl/list.h
index 48502fb4c8cb9099dcb706e661be1e6eac4605f6..29997c78ee8e9f77130f67a57d61bd1319bdcff4 100644
(file)
--- a/
src/glsl/list.h
+++ b/
src/glsl/list.h
@@
-165,6
+165,17
@@
struct exec_node {
this->prev->next = before;
this->prev = before;
}
+ /**
+ * Replace the current node with the given node.
+ */
+ void replace_with(exec_node *replacement)
+ {
+ replacement->prev = this->prev;
+ replacement->next = this->next;
+
+ this->prev->next = replacement;
+ this->next->prev = replacement;
+ }
/**
* Is this the sentinal at the tail of the list?