mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Removed unnecessary reinterpret_cast<> from span implementation.
This commit is contained in:
parent
3b2419532e
commit
bc70a93bba
4
gsl/span
4
gsl/span
@ -420,7 +420,7 @@ public:
|
||||
details::is_allowed_extent_conversion<OtherExtent, Extent>::value &&
|
||||
details::is_allowed_element_type_conversion<OtherElementType, element_type>::value>>
|
||||
constexpr span(const span<OtherElementType, OtherExtent>& other)
|
||||
: storage_(reinterpret_cast<pointer>(other.data()),
|
||||
: storage_(static_cast<pointer>(other.data()),
|
||||
details::extent_type<OtherExtent>(other.size()))
|
||||
{
|
||||
}
|
||||
@ -431,7 +431,7 @@ public:
|
||||
details::is_allowed_extent_conversion<OtherExtent, Extent>::value &&
|
||||
details::is_allowed_element_type_conversion<OtherElementType, element_type>::value>>
|
||||
constexpr span(span<OtherElementType, OtherExtent>&& other)
|
||||
: storage_(reinterpret_cast<pointer>(other.data()),
|
||||
: storage_(static_cast<pointer>(other.data()),
|
||||
details::extent_type<OtherExtent>(other.size()))
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user