mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Return raw pointer for etl::multi_span::operator->(). (#773)
- using `operator*()` in case getting the current element is changed one day - using `&` to get the address Simply returning `p_value` may break in case the internal type of `p_value` would change. This way it is more robust to changes.
This commit is contained in:
parent
fe35751dcb
commit
e631a0fd9b
@ -134,7 +134,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
pointer operator ->()
|
||||
{
|
||||
return *p_value;
|
||||
return &operator*();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -142,7 +142,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
const_pointer operator ->() const
|
||||
{
|
||||
return *p_value;
|
||||
return &operator*();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user