mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #221 from mcheese/master
Correct missing rename of bytes() to size_bytes()
This commit is contained in:
commit
eb28b21049
@ -1669,7 +1669,7 @@ constexpr auto as_span(span<byte, Dimensions...> s) noexcept -> span<
|
|||||||
ByteSpan::bounds_type::static_size % static_cast<std::size_t>(sizeof(U)) == 0),
|
ByteSpan::bounds_type::static_size % static_cast<std::size_t>(sizeof(U)) == 0),
|
||||||
"Target type must be a trivial type and its size must match the byte array size");
|
"Target type must be a trivial type and its size must match the byte array size");
|
||||||
|
|
||||||
Expects((s.bytes() % sizeof(U)) == 0);
|
Expects((s.size_bytes() % sizeof(U)) == 0);
|
||||||
return {reinterpret_cast<U*>(s.data()),
|
return {reinterpret_cast<U*>(s.data()),
|
||||||
s.size_bytes() / narrow_cast<std::ptrdiff_t>(sizeof(U))};
|
s.size_bytes() / narrow_cast<std::ptrdiff_t>(sizeof(U))};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user