mirror of
https://github.com/boostorg/asio.git
synced 2026-01-19 04:02:09 +00:00
Don't use deprecated function boost::array::c_array().
This commit is contained in:
@@ -1015,7 +1015,7 @@ BOOST_ASIO_NODISCARD inline mutable_buffer buffer(
|
||||
boost::array<PodType, N>& data) noexcept
|
||||
{
|
||||
return mutable_buffer(
|
||||
data.c_array(), data.size() * sizeof(PodType));
|
||||
data.data(), data.size() * sizeof(PodType));
|
||||
}
|
||||
|
||||
/// Create a new modifiable buffer that represents the given POD array.
|
||||
@@ -1030,7 +1030,7 @@ BOOST_ASIO_NODISCARD inline mutable_buffer buffer(
|
||||
boost::array<PodType, N>& data,
|
||||
std::size_t max_size_in_bytes) noexcept
|
||||
{
|
||||
return mutable_buffer(data.c_array(),
|
||||
return mutable_buffer(data.data(),
|
||||
data.size() * sizeof(PodType) < max_size_in_bytes
|
||||
? data.size() * sizeof(PodType) : max_size_in_bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user