Remove explicit. Modified assignment

This commit is contained in:
jwellbelove 2015-01-24 19:41:15 +00:00
parent de5901bbd2
commit 12b45e46d6

9
list.h
View File

@ -92,10 +92,10 @@ namespace etl
//*************************************************************************
/// Copy constructor.
//*************************************************************************
explicit list(const list& other)
list(const list& other)
: ilist<T>(node_pool, MAX_SIZE)
{
ilist<T>::assign(other.cbegin(), other.cend());
ilist<T>::assign(other.cbegin(), other.cend());
}
//*************************************************************************
@ -113,7 +113,10 @@ namespace etl
//*************************************************************************
list& operator = (const list& rhs)
{
ilist<T>::assign(rhs.cbegin(), rhs.cend());
if (&rhs != this)
{
ilist<T>::assign(rhs.cbegin(), rhs.cend());
}
return *this;
}