Skip to content

Commit 91e53d8

Browse files
Uncrustify
Signed-off-by: Eugenio Collado <[email protected]>
1 parent 375ff9d commit 91e53d8

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/cpp/rtps/writer/BaseWriter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ uint32_t BaseWriter::calculate_max_payload_size(
214214
if ((overhead + min_fragment_size) > max_data_size)
215215
{
216216
EPROSIMA_LOG_ERROR(RTPS_WRITER, "Datagram length '" << datagram_length << "' is too small." <<
217-
"At least " << overhead << " bytes are needed to send a message. Fixing fragments to " << min_fragment_size << " bytes.");
217+
"At least " << overhead << " bytes are needed to send a message. Fixing fragments to " <<
218+
min_fragment_size << " bytes.");
218219
return min_fragment_size;
219220
}
220221

test/unittest/rtps/history/WriterHistoryTests.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ using namespace testing;
3333
#define MAX_MESSAGE_SIZE 300
3434

3535
void cache_change_fragment(
36-
uint32_t inline_qos_length)
36+
uint32_t inline_qos_length)
3737
{
3838
uint32_t domain_id = 0;
3939
uint32_t initial_reserved_caches = 10;
4040
uint32_t max_message_size = MAX_MESSAGE_SIZE;
4141
std::string max_message_size_str = std::to_string(max_message_size);
4242

4343
RTPSParticipantAttributes p_attr;
44-
p_attr.properties.properties().emplace_back("fastdds.max_message_size", max_message_size_str);
44+
p_attr.properties.properties().emplace_back("fastdds.max_message_size", max_message_size_str);
4545
RTPSParticipant* participant = RTPSDomain::createParticipant(
4646
domain_id, true, p_attr);
4747

@@ -65,10 +65,10 @@ void cache_change_fragment(
6565
change.writerGUID = bwriter->getGuid();
6666
change.serializedPayload.length = 3 * max_allowed_payload_size; // Force to setFragmentSize
6767
change.inline_qos.length = inline_qos_length;
68-
68+
6969
history->add_change(&change);
7070

71-
auto result = change.getFragmentSize();
71+
auto result = change.getFragmentSize();
7272
std::cout << "Fragment size: " << result << std::endl;
7373
ASSERT_NE(result, 0); // Fragment size should always be greater than 0
7474
}

test/unittest/rtps/writer/BaseWriterTests.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ namespace rtps {
3131
using namespace testing;
3232

3333
void max_allowed_payload_size(
34-
uint32_t max_message_size)
34+
uint32_t max_message_size)
3535
{
3636
uint32_t domain_id = 0;
3737
uint32_t initial_reserved_caches = 10;
3838
std::string max_message_size_str = std::to_string(max_message_size);
3939

4040
RTPSParticipantAttributes p_attr;
41-
p_attr.properties.properties().emplace_back("fastdds.max_message_size", max_message_size_str);
41+
p_attr.properties.properties().emplace_back("fastdds.max_message_size", max_message_size_str);
4242
RTPSParticipant* participant = RTPSDomain::createParticipant(
4343
domain_id, true, p_attr);
4444

@@ -58,15 +58,16 @@ void max_allowed_payload_size(
5858
BaseWriter* bwriter = BaseWriter::downcast(writer);
5959

6060
auto result = bwriter->get_max_allowed_payload_size();
61-
std::cout << "For max_message_size: " << max_message_size << " the max allowed payload size is: " << result << std::endl;
61+
std::cout << "For max_message_size: " << max_message_size << " the max allowed payload size is: " << result <<
62+
std::endl;
6263

6364
ASSERT_LE(result, max_message_size);
6465
}
6566

6667
/**
6768
* This test checks the get_max_allowed_payload_size() method of the BaseWriter.
6869
* The method is called within a loop with different values of max_message_size.
69-
* The test checks that the max_payload_size is always less than max_message_size,
70+
* The test checks that the max_payload_size is always less than max_message_size,
7071
* in other case it means an overflow has occurred.
7172
*/
7273
TEST(BaseWriterTests, calculate_max_payload_size_overflow)

0 commit comments

Comments
 (0)