mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-28 21:38:44 +08:00
#649 etl::intrusive_list array bounds test failure
This commit is contained in:
parent
e74f8b46de
commit
16abc0cab4
@ -332,11 +332,6 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
iterator(value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
iterator(const iterator& other)
|
||||
: p_value(other.p_value)
|
||||
{
|
||||
@ -390,6 +385,11 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
iterator(value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
value_type* p_value;
|
||||
};
|
||||
|
||||
@ -407,11 +407,6 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
const_iterator(const value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
const_iterator(const typename intrusive_forward_list::iterator& other)
|
||||
: p_value(other.p_value)
|
||||
{
|
||||
@ -470,6 +465,11 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
const_iterator(const value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
const value_type* p_value;
|
||||
};
|
||||
|
||||
@ -521,7 +521,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
iterator before_begin()
|
||||
{
|
||||
return iterator(&(static_cast<value_type&>(this->start_link)));
|
||||
return iterator(static_cast<value_type*>(&this->start_link));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -529,7 +529,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_iterator before_begin() const
|
||||
{
|
||||
return const_iterator(&(static_cast<const value_type&>(this->start_link)));
|
||||
return const_iterator(static_cast<const value_type*>(&this->start_link));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -569,7 +569,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
reference front()
|
||||
{
|
||||
return static_cast<value_type&>(*(this->get_head()));
|
||||
return *static_cast<value_type*>(this->get_head());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -577,7 +577,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_reference front() const
|
||||
{
|
||||
return static_cast<const value_type&>(*(this->get_head()));
|
||||
return *static_cast<const value_type*>(this->get_head());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -387,11 +387,6 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
iterator(value_type& value)
|
||||
: p_value(&value)
|
||||
{
|
||||
}
|
||||
|
||||
iterator(const iterator& other)
|
||||
: p_value(other.p_value)
|
||||
{
|
||||
@ -460,6 +455,11 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
iterator(value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
value_type* p_value;
|
||||
};
|
||||
|
||||
@ -477,11 +477,6 @@ namespace etl
|
||||
{
|
||||
}
|
||||
|
||||
const_iterator(const value_type& value)
|
||||
: p_value(&value)
|
||||
{
|
||||
}
|
||||
|
||||
const_iterator(const typename intrusive_list::iterator& other)
|
||||
: p_value(other.p_value)
|
||||
{
|
||||
@ -555,6 +550,11 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
const_iterator(const value_type* value)
|
||||
: p_value(value)
|
||||
{
|
||||
}
|
||||
|
||||
const value_type* p_value;
|
||||
};
|
||||
|
||||
@ -590,7 +590,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
iterator begin()
|
||||
{
|
||||
return iterator(static_cast<value_type&>(*this->get_head()));
|
||||
return iterator(static_cast<value_type*>(this->get_head()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -598,7 +598,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_iterator begin() const
|
||||
{
|
||||
return const_iterator(static_cast<const value_type&>(*this->get_head()));
|
||||
return const_iterator(static_cast<const value_type*>(this->get_head()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -606,7 +606,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(static_cast<const value_type&>(*this->get_head()));
|
||||
return const_iterator(static_cast<const value_type*>(this->get_head()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -614,7 +614,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
iterator end()
|
||||
{
|
||||
return iterator(static_cast<value_type&>(this->terminal_link));
|
||||
return iterator(static_cast<value_type*>(&this->terminal_link));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -622,7 +622,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_iterator end() const
|
||||
{
|
||||
return const_iterator(static_cast<const value_type&>(this->terminal_link));
|
||||
return const_iterator(static_cast<const value_type*>(&this->terminal_link));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -630,7 +630,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(static_cast<const value_type&>(this->terminal_link));
|
||||
return const_iterator(static_cast<const value_type*>(&this->terminal_link));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -671,7 +671,7 @@ namespace etl
|
||||
iterator insert(const_iterator position, value_type& value)
|
||||
{
|
||||
this->insert_link(position.p_value->link_type::etl_previous, value);
|
||||
return iterator(value);
|
||||
return iterator(&value);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -737,7 +737,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return iterator(*static_cast<value_type*>(p_last));
|
||||
return iterator(static_cast<value_type*>(p_last));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user