Skip to content

Commit 860a83f

Browse files
JLBuenoLopezrichiware
authored andcommitted
Update to new ReturnCode_t (#74)
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev> Co-authored-by: Ricardo González Moreno <ricardo@richiware.dev>
1 parent 344d44a commit 860a83f

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

include/LateJoiner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ void DelayedEndpointDestruction<ReaderWriter>::operator ()(
437437

438438
// and we removed the endpoint: Domain::removeDataWriter or Domain::removeDataReader
439439
ret = (manager.*LateJoinerDataTraits<ReaderWriter>::remove_endpoint_function)(endpoint);
440-
if (ReturnCode_t::RETCODE_OK != ret)
440+
if (RETCODE_OK != ret)
441441
{
442442
LOG_ERROR("Error deleting Endpoint");
443443
}

src/DiscoveryServerManager.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ DiscoveryServerManager::DiscoveryServerManager(
113113
tinyxml2::XMLPrinter printer;
114114
profiles->Accept(&printer);
115115
std::string xmlString = R"(")" + std::string(printer.CStr()) + R"(")";
116-
if (ReturnCode_t::RETCODE_OK ==
116+
if (RETCODE_OK ==
117117
DomainParticipantFactory::get_instance()->load_XML_profiles_string(xmlString.c_str(),
118118
std::string(printer.CStr()).length()))
119119
{
@@ -427,7 +427,7 @@ ReturnCode_t DiscoveryServerManager::deleteDataReader(
427427
{
428428
if (dr == nullptr)
429429
{
430-
return ReturnCode_t::RETCODE_ERROR;
430+
return RETCODE_ERROR;
431431
}
432432
fastdds::dds::Subscriber* sub = nullptr;
433433
{
@@ -439,15 +439,15 @@ ReturnCode_t DiscoveryServerManager::deleteDataReader(
439439
{
440440
return sub->delete_datareader(dr);
441441
}
442-
return ReturnCode_t::RETCODE_ERROR;
442+
return RETCODE_ERROR;
443443
}
444444

445445
ReturnCode_t DiscoveryServerManager::deleteDataWriter(
446446
DataWriter* dw)
447447
{
448448
if (dw == nullptr)
449449
{
450-
return ReturnCode_t::RETCODE_ERROR;
450+
return RETCODE_ERROR;
451451
}
452452
fastdds::dds::Publisher* pub = nullptr;
453453
{
@@ -459,7 +459,7 @@ ReturnCode_t DiscoveryServerManager::deleteDataWriter(
459459
{
460460
return pub->delete_datawriter(dw);
461461
}
462-
return ReturnCode_t::RETCODE_ERROR;
462+
return RETCODE_ERROR;
463463
}
464464

465465
ReturnCode_t DiscoveryServerManager::deleteParticipant(
@@ -468,7 +468,7 @@ ReturnCode_t DiscoveryServerManager::deleteParticipant(
468468
{
469469
if (participant == nullptr)
470470
{
471-
return ReturnCode_t::RETCODE_ERROR;
471+
return RETCODE_ERROR;
472472
}
473473

474474
std::lock_guard<std::recursive_mutex> lock(management_mutex);
@@ -477,7 +477,7 @@ ReturnCode_t DiscoveryServerManager::deleteParticipant(
477477
entity_map.erase(participant->guid());
478478

479479
ReturnCode_t ret = participant->delete_contained_entities();
480-
if (ret != ReturnCode_t::RETCODE_OK)
480+
if (ret != RETCODE_OK)
481481
{
482482
LOG_ERROR("Error cleaning up participant entities");
483483
}
@@ -704,13 +704,13 @@ void DiscoveryServerManager::onTerminate()
704704
entity.second->set_listener(nullptr);
705705

706706
ReturnCode_t ret = entity.second->delete_contained_entities();
707-
if (ReturnCode_t::RETCODE_OK != ret)
707+
if (RETCODE_OK != ret)
708708
{
709709
LOG_ERROR("Error cleaning up client entities");
710710
}
711711

712712
ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
713-
if (ReturnCode_t::RETCODE_OK != ret)
713+
if (RETCODE_OK != ret)
714714
{
715715
LOG_ERROR("Error deleting Client");
716716
}
@@ -723,13 +723,13 @@ void DiscoveryServerManager::onTerminate()
723723
entity.second->set_listener(nullptr);
724724

725725
ReturnCode_t ret = entity.second->delete_contained_entities();
726-
if (ReturnCode_t::RETCODE_OK != ret)
726+
if (RETCODE_OK != ret)
727727
{
728728
LOG_ERROR("Error cleaning up simple entities");
729729
}
730730

731731
ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
732-
if (ReturnCode_t::RETCODE_OK != ret)
732+
if (RETCODE_OK != ret)
733733
{
734734
LOG_ERROR("Error deleting Simple Discovery Entity");
735735
}
@@ -741,13 +741,13 @@ void DiscoveryServerManager::onTerminate()
741741
entity.second->set_listener(nullptr);
742742

743743
ReturnCode_t ret = entity.second->delete_contained_entities();
744-
if (ReturnCode_t::RETCODE_OK != ret)
744+
if (RETCODE_OK != ret)
745745
{
746746
LOG_ERROR("Error cleaning up server entities");
747747
}
748748

749749
ret = DomainParticipantFactory::get_instance()->delete_participant(entity.second);
750-
if (ReturnCode_t::RETCODE_OK != ret)
750+
if (RETCODE_OK != ret)
751751
{
752752
LOG_ERROR("Error deleting Server");
753753
}
@@ -824,7 +824,7 @@ void DiscoveryServerManager::loadServer(
824824

825825
// retrieve profile attributes
826826
DomainParticipantQos dpQOS;
827-
if (ReturnCode_t::RETCODE_OK !=
827+
if (RETCODE_OK !=
828828
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
829829
dpQOS))
830830
{
@@ -996,7 +996,7 @@ void DiscoveryServerManager::loadClient(
996996

997997
// retrieve profile attributes
998998
DomainParticipantQos dpQOS;
999-
if (ReturnCode_t::RETCODE_OK !=
999+
if (RETCODE_OK !=
10001000
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
10011001
dpQOS))
10021002
{
@@ -1270,7 +1270,7 @@ void DiscoveryServerManager::loadSimple(
12701270
if (profile_name != nullptr)
12711271
{
12721272
// retrieve profile attributes
1273-
if (ReturnCode_t::RETCODE_OK !=
1273+
if (RETCODE_OK !=
12741274
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(std::string(profile_name),
12751275
dpQOS))
12761276
{
@@ -1645,7 +1645,7 @@ void DiscoveryServerManager::MapServerInfo(
16451645
// I must load the prefix from the profile
16461646
// retrieve profile QOS
16471647
pqos = std::make_shared<DomainParticipantQos>();
1648-
if (ReturnCode_t::RETCODE_OK !=
1648+
if (RETCODE_OK !=
16491649
DomainParticipantFactory::get_instance()->get_participant_qos_from_profile(profile_name, *pqos))
16501650
{
16511651
LOG_ERROR("DiscoveryServerManager::loadServer couldn't load profile " << profile_name);

src/LateJoiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void DelayedParticipantDestruction::operator ()(
7070
std::string name = p->get_qos().name().to_string();
7171

7272
ReturnCode_t ret = manager.deleteParticipant(p);
73-
if (ReturnCode_t::RETCODE_OK != ret)
73+
if (RETCODE_OK != ret)
7474
{
7575
LOG_ERROR("Error during delayed deletion of Participant");
7676
}

0 commit comments

Comments
 (0)