From 6edd27698ffe5dfc9a2501d2d2d49683b1c62f24 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 8 Oct 2016 08:58:00 +0100 Subject: [PATCH] Added default constructors to automatically clear links. --- src/intrusive_links.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/intrusive_links.h b/src/intrusive_links.h index 00ebb14f..47e46a22 100644 --- a/src/intrusive_links.h +++ b/src/intrusive_links.h @@ -114,6 +114,11 @@ namespace etl OPTION = OPTION_ }; + forward_link_base() + { + clear(); + } + void clear() { etl_next = nullptr; @@ -329,6 +334,11 @@ namespace etl OPTION = OPTION_ }; + bidirectional_link_base() + { + clear(); + } + void clear() { etl_previous = nullptr; @@ -662,6 +672,11 @@ namespace etl OPTION = OPTION_ }; + tree_link_base() + { + clear(); + } + void clear() { etl_parent = nullptr;