Skip to content

Commit f976e52

Browse files
authored
Apply uncrustify to all source files (#6286)
* Apply uncrustify to all source files Signed-off-by: Raül <raulojeda@eprosima.com> * Apply general uncrustify again Signed-off-by: Raül <raulojeda@eprosima.com> * Apply manual uncrustify changes Signed-off-by: Raül <raulojeda@eprosima.com> * Some more manual changes to uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Revert sqlite3.h uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * New code style solving several issues pointing to new branch Signed-off-by: Raül <raulojeda@eprosima.com> * New uncrustify again Signed-off-by: Raül <raulojeda@eprosima.com> * Revert mistakes Signed-off-by: Raül <raulojeda@eprosima.com> * Apply .h uncrustify changes Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> * Uncrustify Signed-off-by: Raül <raulojeda@eprosima.com> --------- Signed-off-by: Raül <raulojeda@eprosima.com>
1 parent 15519c1 commit f976e52

285 files changed

Lines changed: 5449 additions & 3798 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/cpp/benchmark/PublisherApp.cpp

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ void PublisherApp::on_data_available(
241241
{
242242
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
243243
{
244-
std::cout << "Sample with index: '" <<
245-
benchmark_.index() << "' (Array 0 Bytes) RECEIVED" << std::endl;
244+
std::cout << "Sample with index: '"
245+
<< benchmark_.index() << "' (Array 0 Bytes) RECEIVED" << std::endl;
246246
if ((elapsed.count() >= timeout_ && timeout_ != 0) || (count >= samples_ && samples_ != 0))
247247
{
248248
cv_.notify_one();
@@ -254,8 +254,8 @@ void PublisherApp::on_data_available(
254254

255255
if ((RETCODE_OK == writer_->write(&benchmark_)) == true)
256256
{
257-
std::cout << "Sample with index: '" <<
258-
benchmark_.index() << "' (Array 0 Bytes) SENT" << std::endl;
257+
std::cout << "Sample with index: '"
258+
<< benchmark_.index() << "' (Array 0 Bytes) SENT" << std::endl;
259259
}
260260
}
261261
}
@@ -266,9 +266,10 @@ void PublisherApp::on_data_available(
266266
{
267267
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
268268
{
269-
std::cout << "Sample with index: '" <<
270-
benchmark_small_.index() << "' (Array " << static_cast<int>(benchmark_small_.array().size()) <<
271-
" Bytes) RECEIVED" << std::endl;
269+
std::cout << "Sample with index: '"
270+
<< benchmark_small_.index() << "' (Array "
271+
<< static_cast<int>(benchmark_small_.array().size())
272+
<< " Bytes) RECEIVED" << std::endl;
272273
if ((elapsed.count() >= timeout_ && timeout_ != 0) || (count >= samples_ && samples_ != 0))
273274
{
274275
cv_.notify_one();
@@ -280,10 +281,10 @@ void PublisherApp::on_data_available(
280281

281282
if ((RETCODE_OK == writer_->write(&benchmark_small_)) == true)
282283
{
283-
std::cout << "Sample with index: '" <<
284-
benchmark_small_.index() << "' (Array " <<
285-
static_cast<int>(benchmark_small_.array().size()) <<
286-
" Bytes) SENT" << std::endl;
284+
std::cout << "Sample with index: '"
285+
<< benchmark_small_.index() << "' (Array "
286+
<< static_cast<int>(benchmark_small_.array().size())
287+
<< " Bytes) SENT" << std::endl;
287288
}
288289
}
289290
}
@@ -294,10 +295,10 @@ void PublisherApp::on_data_available(
294295
{
295296
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
296297
{
297-
std::cout << "Sample with index: '" <<
298-
benchmark_medium_.index() << "' (Array " <<
299-
static_cast<int>(benchmark_medium_.data().size()) <<
300-
" Bytes) RECEIVED" << std::endl;
298+
std::cout << "Sample with index: '"
299+
<< benchmark_medium_.index() << "' (Array "
300+
<< static_cast<int>(benchmark_medium_.data().size())
301+
<< " Bytes) RECEIVED" << std::endl;
301302
if ((elapsed.count() >= timeout_ && timeout_ != 0) || (count >= samples_ && samples_ != 0))
302303
{
303304
cv_.notify_one();
@@ -309,10 +310,10 @@ void PublisherApp::on_data_available(
309310

310311
if ((RETCODE_OK == writer_->write(&benchmark_medium_)) == true)
311312
{
312-
std::cout << "Sample with index: '" <<
313-
benchmark_medium_.index() << "' (Array " <<
314-
static_cast<int>(benchmark_medium_.data().size()) <<
315-
" Bytes) SENT" << std::endl;
313+
std::cout << "Sample with index: '"
314+
<< benchmark_medium_.index() << "' (Array "
315+
<< static_cast<int>(benchmark_medium_.data().size())
316+
<< " Bytes) SENT" << std::endl;
316317
}
317318
}
318319
}
@@ -323,9 +324,10 @@ void PublisherApp::on_data_available(
323324
{
324325
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
325326
{
326-
std::cout << "Sample with index: '" <<
327-
benchmark_big_.index() << "' (Array " << static_cast<int>(benchmark_big_.data().size()) <<
328-
" Bytes) RECEIVED" << std::endl;
327+
std::cout << "Sample with index: '"
328+
<< benchmark_big_.index() << "' (Array "
329+
<< static_cast<int>(benchmark_big_.data().size())
330+
<< " Bytes) RECEIVED" << std::endl;
329331
if ((elapsed.count() >= timeout_ && timeout_ != 0) || (count >= samples_ && samples_ != 0))
330332
{
331333
cv_.notify_one();
@@ -337,9 +339,10 @@ void PublisherApp::on_data_available(
337339

338340
if ((RETCODE_OK == writer_->write(&benchmark_big_)) == true)
339341
{
340-
std::cout << "Sample with index: '" <<
341-
benchmark_big_.index() << "' (Array " << static_cast<int>(benchmark_big_.data().size()) <<
342-
" Bytes) SENT" << std::endl;
342+
std::cout << "Sample with index: '"
343+
<< benchmark_big_.index() << "' (Array "
344+
<< static_cast<int>(benchmark_big_.data().size())
345+
<< " Bytes) SENT" << std::endl;
343346
}
344347
}
345348
}
@@ -472,8 +475,8 @@ bool PublisherApp::publish()
472475
if (ret == true)
473476
{
474477
std::cout << "First Sample with index: '"
475-
<< benchmark_small_.index() << "' (Array " <<
476-
static_cast<int>(benchmark_small_.array().size())
478+
<< benchmark_small_.index() << "' (Array "
479+
<< static_cast<int>(benchmark_small_.array().size())
477480
<< " Bytes) SENT" << std::endl;
478481
}
479482
break;
@@ -484,8 +487,8 @@ bool PublisherApp::publish()
484487
if (ret == true)
485488
{
486489
std::cout << "First Sample with index: '"
487-
<< benchmark_medium_.index() << "' (Array " <<
488-
static_cast<int>(benchmark_medium_.data().size())
490+
<< benchmark_medium_.index() << "' (Array "
491+
<< static_cast<int>(benchmark_medium_.data().size())
489492
<< " Bytes) SENT" << std::endl;
490493
}
491494
break;
@@ -496,8 +499,8 @@ bool PublisherApp::publish()
496499
if (ret == true)
497500
{
498501
std::cout << "First Sample with index: '"
499-
<< benchmark_big_.index() << "' (Array " <<
500-
static_cast<int>(benchmark_big_.data().size())
502+
<< benchmark_big_.index() << "' (Array "
503+
<< static_cast<int>(benchmark_big_.data().size())
501504
<< " Bytes) SENT" << std::endl;
502505
}
503506
break;

examples/cpp/benchmark/SubscriberApp.cpp

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ void SubscriberApp::on_data_available(
230230
{
231231
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
232232
{
233-
std::cout << "Sample with index: '" <<
234-
benchmark_.index() << "' (Array 0 Bytes) RECEIVED" << std::endl;
233+
std::cout << "Sample with index: '"
234+
<< benchmark_.index() << "' (Array 0 Bytes) RECEIVED" << std::endl;
235235
benchmark_.index(benchmark_.index() + 1);
236236
if (samples_ != 0 && benchmark_.index() >= samples_)
237237
{
@@ -240,8 +240,8 @@ void SubscriberApp::on_data_available(
240240
}
241241
if ((RETCODE_OK == writer_->write(&benchmark_)) == true)
242242
{
243-
std::cout << "Sample with index: '" <<
244-
benchmark_.index() << "' (Array 0 Bytes) SENT" << std::endl;
243+
std::cout << "Sample with index: '"
244+
<< benchmark_.index() << "' (Array 0 Bytes) SENT" << std::endl;
245245
}
246246
}
247247
}
@@ -252,9 +252,10 @@ void SubscriberApp::on_data_available(
252252
{
253253
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
254254
{
255-
std::cout << "Sample with index: '" <<
256-
benchmark_small_.index() << "' (Array " << static_cast<int>(benchmark_small_.array().size()) <<
257-
" Bytes) RECEIVED" << std::endl;
255+
std::cout << "Sample with index: '"
256+
<< benchmark_small_.index() << "' (Array "
257+
<< static_cast<int>(benchmark_small_.array().size())
258+
<< " Bytes) RECEIVED" << std::endl;
258259
benchmark_small_.index(benchmark_small_.index() + 1);
259260
if (samples_ != 0 && benchmark_small_.index() >= samples_)
260261
{
@@ -263,10 +264,10 @@ void SubscriberApp::on_data_available(
263264
}
264265
if ((RETCODE_OK == writer_->write(&benchmark_small_)) == true)
265266
{
266-
std::cout << "Sample with index: '" <<
267-
benchmark_small_.index() << "' (Array " <<
268-
static_cast<int>(benchmark_small_.array().size()) <<
269-
" Bytes) SENT" << std::endl;
267+
std::cout << "Sample with index: '"
268+
<< benchmark_small_.index() << "' (Array "
269+
<< static_cast<int>(benchmark_small_.array().size())
270+
<< " Bytes) SENT" << std::endl;
270271
}
271272
}
272273
}
@@ -277,10 +278,10 @@ void SubscriberApp::on_data_available(
277278
{
278279
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
279280
{
280-
std::cout << "Sample with index: '" <<
281-
benchmark_medium_.index() << "' (Array " <<
282-
static_cast<int>(benchmark_medium_.data().size()) <<
283-
" Bytes) RECEIVED" << std::endl;
281+
std::cout << "Sample with index: '"
282+
<< benchmark_medium_.index() << "' (Array "
283+
<< static_cast<int>(benchmark_medium_.data().size())
284+
<< " Bytes) RECEIVED" << std::endl;
284285
benchmark_medium_.index(benchmark_medium_.index() + 1);
285286
if (samples_ != 0 && benchmark_medium_.index() >= samples_)
286287
{
@@ -289,10 +290,10 @@ void SubscriberApp::on_data_available(
289290
}
290291
if ((RETCODE_OK == writer_->write(&benchmark_medium_)) == true)
291292
{
292-
std::cout << "Sample with index: '" <<
293-
benchmark_medium_.index() << "' (Array " <<
294-
static_cast<int>(benchmark_medium_.data().size()) <<
295-
" Bytes) SENT" << std::endl;
293+
std::cout << "Sample with index: '"
294+
<< benchmark_medium_.index() << "' (Array "
295+
<< static_cast<int>(benchmark_medium_.data().size())
296+
<< " Bytes) SENT" << std::endl;
296297
}
297298
}
298299
}
@@ -303,9 +304,10 @@ void SubscriberApp::on_data_available(
303304
{
304305
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
305306
{
306-
std::cout << "Sample with index: '" <<
307-
benchmark_big_.index() << "' (Array " << static_cast<int>(benchmark_big_.data().size()) <<
308-
" Bytes) RECEIVED" << std::endl;
307+
std::cout << "Sample with index: '"
308+
<< benchmark_big_.index() << "' (Array "
309+
<< static_cast<int>(benchmark_big_.data().size())
310+
<< " Bytes) RECEIVED" << std::endl;
309311
benchmark_big_.index(benchmark_big_.index() + 1);
310312
if (samples_ != 0 && benchmark_big_.index() >= samples_)
311313
{
@@ -314,9 +316,10 @@ void SubscriberApp::on_data_available(
314316
}
315317
if ((RETCODE_OK == writer_->write(&benchmark_big_)) == true)
316318
{
317-
std::cout << "Sample with index: '" <<
318-
benchmark_big_.index() << "' (Array " << static_cast<int>(benchmark_big_.data().size()) <<
319-
" Bytes) SENT" << std::endl;
319+
std::cout << "Sample with index: '"
320+
<< benchmark_big_.index() << "' (Array "
321+
<< static_cast<int>(benchmark_big_.data().size())
322+
<< " Bytes) SENT" << std::endl;
320323
}
321324
}
322325
}

examples/cpp/benchmark/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ int main(
8383
{
8484
if (config.pub_config.samples != 0)
8585
{
86-
std::cout << app_name << " running for " << config.pub_config.samples <<
87-
" samples. Please press Ctrl+C "
86+
std::cout << app_name << " running for " << config.pub_config.samples
87+
<< " samples. Please press Ctrl+C "
8888
<< "to stop the " << app_name << " at any time." << std::endl;
8989
}
9090
else

examples/cpp/configuration/SubscriberApp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ void SubscriberApp::on_data_available(
196196
if ((info.instance_state == ALIVE_INSTANCE_STATE) && info.valid_data)
197197
{
198198
received_samples_++;
199-
std::cout << "Sample: '" << configuration_.message().data() << "' with index: '" <<
200-
configuration_.index() << "' (" << static_cast<int>(configuration_.data().size()) <<
201-
" Bytes) RECEIVED" << std::endl;
199+
std::cout << "Sample: '" << configuration_.message().data() << "' with index: '"
200+
<< configuration_.index() << "' (" << static_cast<int>(configuration_.data().size())
201+
<< " Bytes) RECEIVED" << std::endl;
202202
if ((samples_ > 0) && (received_samples_ >= samples_))
203203
{
204204
stop();

examples/cpp/delivery_mechanisms/PubSubApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ void PubSubApp::on_data_available(
344344
const DeliveryMechanisms& delivery_mechanisms_ = delivery_mechanisms_sequence[i];
345345

346346
received_samples_++;
347-
std::cout << "Sample: '" << delivery_mechanisms_.message().data() << "' with index: '" <<
348-
delivery_mechanisms_.index() << "' RECEIVED" << std::endl;
347+
std::cout << "Sample: '" << delivery_mechanisms_.message().data() << "' with index: '"
348+
<< delivery_mechanisms_.index() << "' RECEIVED" << std::endl;
349349
if ((samples_ > 0) && (received_samples_ >= samples_))
350350
{
351351
break;

examples/cpp/delivery_mechanisms/SubscriberApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ void SubscriberApp::on_data_available(
257257
const DeliveryMechanisms& delivery_mechanisms_ = delivery_mechanisms_sequence[i];
258258

259259
received_samples_++;
260-
std::cout << "Sample: '" << delivery_mechanisms_.message().data() << "' with index: '" <<
261-
delivery_mechanisms_.index() << "' RECEIVED" << std::endl;
260+
std::cout << "Sample: '" << delivery_mechanisms_.message().data() << "' with index: '"
261+
<< delivery_mechanisms_.index() << "' RECEIVED" << std::endl;
262262
if ((samples_ > 0) && (received_samples_ >= samples_))
263263
{
264264
stop();

examples/cpp/discovery_server/ClientPublisherApp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ ClientPublisherApp::ClientPublisherApp(
154154
throw std::runtime_error("Participant initialization failed");
155155
}
156156

157-
std::cout <<
158-
"Publisher Participant " << pqos.name() <<
159-
" created with GUID " << participant_->guid() <<
160-
" connecting to server <" << server_locator << "> " <<
161-
std::endl;
157+
std::cout
158+
<< "Publisher Participant " << pqos.name()
159+
<< " created with GUID " << participant_->guid()
160+
<< " connecting to server <" << server_locator << "> "
161+
<< std::endl;
162162

163163
// Regsiter type
164164
type_.register_type(participant_);

examples/cpp/discovery_server/ClientSubscriberApp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ ClientSubscriberApp::ClientSubscriberApp(
156156
throw std::runtime_error("Participant initialization failed");
157157
}
158158

159-
std::cout <<
160-
"Subscriber Participant " << pqos.name() <<
161-
" created with GUID " << participant_->guid() <<
162-
" connecting to server <" << server_locator << "> " <<
163-
std::endl;
159+
std::cout
160+
<< "Subscriber Participant " << pqos.name()
161+
<< " created with GUID " << participant_->guid()
162+
<< " connecting to server <" << server_locator << "> "
163+
<< std::endl;
164164

165165
// Register the type
166166
type_.register_type(participant_);

examples/cpp/discovery_server/ServerApp.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,20 @@ ServerApp::ServerApp(
172172

173173
if (config.is_also_client)
174174
{
175-
std::cout <<
176-
"Server Participant " << pqos.name() <<
177-
" created with GUID " << participant_->guid() <<
178-
" listening in address <" << listening_locator << "> " <<
179-
" connected to address <" << connection_locator << "> " <<
180-
std::endl;
175+
std::cout
176+
<< "Server Participant " << pqos.name()
177+
<< " created with GUID " << participant_->guid()
178+
<< " listening in address <" << listening_locator << "> "
179+
<< " connected to address <" << connection_locator << "> "
180+
<< std::endl;
181181
}
182182
else
183183
{
184-
std::cout <<
185-
"Server Participant " << pqos.name() <<
186-
" created with GUID " << participant_->guid() <<
187-
" listening in address <" << listening_locator << "> " <<
188-
std::endl;
184+
std::cout
185+
<< "Server Participant " << pqos.name()
186+
<< " created with GUID " << participant_->guid()
187+
<< " listening in address <" << listening_locator << "> "
188+
<< std::endl;
189189
}
190190
}
191191

examples/cpp/flow_control/SubscriberApp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ void SubscriberApp::on_data_available(
145145
if (it_f != fast_writer_guid.end())
146146
{
147147
fast_messages++;
148-
std::cout << "Sample RECEIVED from FAST writer with id " << *it_f << ", index=" << msg.index() <<
149-
std::endl;
148+
std::cout << "Sample RECEIVED from FAST writer with id " << *it_f << ", index=" << msg.index()
149+
<< std::endl;
150150
}
151151
else if (it_s != slow_writer_guid.end())
152152
{
153153
slow_messages++;
154-
std::cout << "Sample RECEIVED from SLOW writer with id " << *it_s << ", index=" << msg.index() <<
155-
std::endl;
154+
std::cout << "Sample RECEIVED from SLOW writer with id " << *it_s << ", index=" << msg.index()
155+
<< std::endl;
156156
}
157157

158158
if ((samples_ > 0) && (fast_messages >= samples_) && (slow_messages >= samples_))

0 commit comments

Comments
 (0)