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:
David Hebbeker 2023-10-13 21:48:46 +02:00 committed by GitHub
parent fe35751dcb
commit e631a0fd9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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*();
}
//*************************************************************************