From e9c17deb3ff91591e50fa938e052bc733d4b5d4b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 13 Nov 2016 16:27:21 +0000 Subject: [PATCH] Removed AUTO specialisations for forward and tree links. --- src/intrusive_links.h | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/intrusive_links.h b/src/intrusive_links.h index 47e46a22..eb0bf522 100644 --- a/src/intrusive_links.h +++ b/src/intrusive_links.h @@ -146,17 +146,10 @@ namespace etl // There is no valid specialisation for auto link //****************************************************************** template - struct forward_link - : public __private_intrusive_links__::forward_link_base, ID_, etl::link_option::AUTO> - { - forward_link() - { - this->clear(); - } - }; + struct forward_link; //****************************************************************** - // Specialisation for checked unlink option. + // Specialisation for checked link option. // An error will be generated if the links are valid when the object // is destroyed. //****************************************************************** @@ -171,7 +164,7 @@ namespace etl ~forward_link() { - assert(this->etl_next != nullptr); + assert(this->etl_next == nullptr); } }; @@ -708,14 +701,7 @@ namespace etl // There is no valid specialisation for auto link //****************************************************************** template - struct tree_link - : public __private_intrusive_links__::tree_link_base, ID_, etl::link_option::AUTO> - { - tree_link() - { - this->clear(); - } - }; + struct tree_link; //****************************************************************** // Specialisation for checked unlink option. @@ -733,9 +719,9 @@ namespace etl ~tree_link() { - assert(this->etl_parent != nullptr); - assert(this->etl_left != nullptr); - assert(this->etl_right != nullptr); + assert(this->etl_parent == nullptr); + assert(this->etl_left == nullptr); + assert(this->etl_right == nullptr); } };