2
0
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:
Christopher Kohlhoff
2025-10-30 20:41:47 +11:00
parent c802a01950
commit 10f61afbd8

View File

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