Mesa (master): glsl: Make exec_node members just wrap the C API.

Matt Turner mattst88 at kemper.freedesktop.org
Tue Jun 10 20:08:07 UTC 2014


Module: Mesa
Branch: master
Commit: b10ad648a1ae7b1ab83eba10d33f57d494ccd117
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b10ad648a1ae7b1ab83eba10d33f57d494ccd117

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Jun 10 00:28:53 2014 -0700

glsl: Make exec_node members just wrap the C API.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/glsl/list.h |   38 +++++++++++---------------------------
 1 file changed, 11 insertions(+), 27 deletions(-)

diff --git a/src/glsl/list.h b/src/glsl/list.h
index a1200ac..49a9a5e 100644
--- a/src/glsl/list.h
+++ b/src/glsl/list.h
@@ -214,73 +214,57 @@ exec_node_is_head_sentinel(const struct exec_node *n)
 #ifdef __cplusplus
 inline const exec_node *exec_node::get_next() const
 {
-   return next;
+   return exec_node_get_next_const(this);
 }
 
 inline exec_node *exec_node::get_next()
 {
-   return next;
+   return exec_node_get_next(this);
 }
 
 inline const exec_node *exec_node::get_prev() const
 {
-   return prev;
+   return exec_node_get_prev_const(this);
 }
 
 inline exec_node *exec_node::get_prev()
 {
-   return prev;
+   return exec_node_get_prev(this);
 }
 
 inline void exec_node::remove()
 {
-   next->prev = prev;
-   prev->next = next;
-   next = NULL;
-   prev = NULL;
+   exec_node_remove(this);
 }
 
 inline void exec_node::self_link()
 {
-   next = this;
-   prev = this;
+   exec_node_self_link(this);
 }
 
 inline void exec_node::insert_after(exec_node *after)
 {
-   after->next = this->next;
-   after->prev = this;
-
-   this->next->prev = after;
-   this->next = after;
+   exec_node_insert_after(this, after);
 }
 
 inline void exec_node::insert_before(exec_node *before)
 {
-   before->next = this;
-   before->prev = this->prev;
-
-   this->prev->next = before;
-   this->prev = before;
+   exec_node_insert_node_before(this, before);
 }
 
 inline void exec_node::replace_with(exec_node *replacement)
 {
-   replacement->prev = this->prev;
-   replacement->next = this->next;
-
-   this->prev->next = replacement;
-   this->next->prev = replacement;
+   exec_node_replace_with(this, replacement);
 }
 
 inline bool exec_node::is_tail_sentinel() const
 {
-   return this->next == NULL;
+   return exec_node_is_tail_sentinel(this);
 }
 
 inline bool exec_node::is_head_sentinel() const
 {
-   return this->prev == NULL;
+   return exec_node_is_head_sentinel(this);
 }
 #endif
 




More information about the mesa-commit mailing list