mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Remove explicit. Modified assignment
This commit is contained in:
parent
de5901bbd2
commit
12b45e46d6
9
list.h
9
list.h
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user