From 12b45e46d61407ecfe7690dc42d217398599d713 Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Sat, 24 Jan 2015 19:41:15 +0000 Subject: [PATCH] Remove explicit. Modified assignment --- list.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/list.h b/list.h index d1cb6eed..a6859b6a 100644 --- a/list.h +++ b/list.h @@ -92,10 +92,10 @@ namespace etl //************************************************************************* /// Copy constructor. //************************************************************************* - explicit list(const list& other) + list(const list& other) : ilist(node_pool, MAX_SIZE) { - ilist::assign(other.cbegin(), other.cend()); + ilist::assign(other.cbegin(), other.cend()); } //************************************************************************* @@ -113,7 +113,10 @@ namespace etl //************************************************************************* list& operator = (const list& rhs) { - ilist::assign(rhs.cbegin(), rhs.cend()); + if (&rhs != this) + { + ilist::assign(rhs.cbegin(), rhs.cend()); + } return *this; }