From 8fb857f9da16a043f15c8447d4bc37c1d2ca4819 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 6 Sep 2016 22:47:52 -0400 Subject: [PATCH 1/3] intrusive_list: Specify noexcept on swap implementations Necessary to fully satisfy the Swappable concept. --- src/common/intrusive_list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index 9fd2bc66..fcf1bd5d 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -355,7 +355,7 @@ public: * Exchanges contents of this list with another list instance. * @param other The other list to swap with. */ - void swap(IntrusiveList& other) { + void swap(IntrusiveList& other) noexcept { root.swap(other.root); } @@ -370,7 +370,7 @@ private: * @param rhs The second list. */ template -void swap(IntrusiveList& lhs, IntrusiveList& rhs) { +void swap(IntrusiveList& lhs, IntrusiveList& rhs) noexcept { lhs.swap(rhs); } From 1c4868ccceffe2ca53caa7c904209cb0ab204cf9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 6 Sep 2016 22:50:02 -0400 Subject: [PATCH 2/3] intrusive_list: Correct unused variable --- src/common/intrusive_list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index fcf1bd5d..fe24fa6d 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -238,7 +238,7 @@ public: */ pointer remove(const iterator& it) { iterator copy = it; - return remove(it); + return remove(copy); } /** From c052f9f84c85a75d6e77e23ac91beb4da24ee9d1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 6 Sep 2016 22:51:16 -0400 Subject: [PATCH 3/3] intrusive_list: Amend doxygen parameter documentation --- src/common/intrusive_list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index fe24fa6d..c4c5cb38 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -215,7 +215,7 @@ public: /** * Removes a node from this list - * @param node An iterator that points to the node to remove from list. + * @param it An iterator that points to the node to remove from list. */ pointer remove(iterator& it) { DEBUG_ASSERT(it != end()); @@ -234,7 +234,7 @@ public: /** * Removes a node from this list - * @param node A constant iterator that points to the node to remove from list. + * @param it A constant iterator that points to the node to remove from list. */ pointer remove(const iterator& it) { iterator copy = it;