mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 13:48:38 +00:00
Network Asio: conditionally remove use of buffer_cast
This commit is contained in:
parent
5f959917e1
commit
33f60c16a9
@ -41,7 +41,11 @@ std::deque<boost::asio::const_buffer> split_buffers(boost::asio::streambuf::cons
|
||||
std::deque<boost::asio::const_buffer> buffers;
|
||||
for(boost::asio::const_buffer b : source_buffers) {
|
||||
unsigned int remaining_size = boost::asio::buffer_size(b);
|
||||
#if BOOST_VERSION >= 106600
|
||||
const uint8_t* data = static_cast<const uint8_t*>(b.data());
|
||||
#else
|
||||
const uint8_t* data = boost::asio::buffer_cast<const uint8_t*>(b);
|
||||
#endif
|
||||
|
||||
while(remaining_size > 0u) {
|
||||
unsigned int size = std::min(remaining_size, chunk_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user