Skip to content

Commit

Permalink
Refs #20352: Fix windows build
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <[email protected]>
  • Loading branch information
cferreiragonz committed Mar 12, 2024
1 parent b929fdf commit af3951c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions include/fastdds/rtps/network/NetworkBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
#ifndef _FASTDDS_RTPS_NETWORK_NETWORKBUFFER_HPP
#define _FASTDDS_RTPS_NETWORK_NETWORKBUFFER_HPP

#include <cstdint> // uint32_t
#include <cstdlib> // size_t
#include <cstdint>
#include <asio.hpp>

namespace eprosima {
Expand All @@ -36,7 +35,7 @@ struct NetworkBuffer final
//! Pointer to the buffer where the data is stored.
const void* buffer;
//! Number of bytes to use starting at @c buffer.
size_t size;
uint32_t size;

NetworkBuffer(
const void* ptr,
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/rtps/transport/test_UDPv4Transport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ bool test_UDPv4Transport::log_drop(
const std::list<NetworkBuffer>& buffers,
uint32_t size)
{
uint32_t total_size = size;
if (test_UDPv4Transport_DropLog.size() < test_UDPv4Transport_DropLogLength)
{
vector<octet> message;
Expand All @@ -502,7 +503,7 @@ bool test_UDPv4Transport::log_drop(
auto byte_data = static_cast<const octet*>(buf.buffer);
message.insert(message.end(), byte_data, byte_data + buf.size);
}
assert(message.size() == size);
assert(message.size() == total_size);
test_UDPv4Transport_DropLog.push_back(message);
return true;
}
Expand Down

0 comments on commit af3951c

Please sign in to comment.