Skip to content

Commit

Permalink
clang tidy ecal/core/src/pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Nov 10, 2023
1 parent fc330d5 commit 5cd4c7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions ecal/core/src/pubsub/ecal_pubgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace eCAL
CDataWriter::SLocalSubscriptionInfo subscription_info;
subscription_info.topic_id = ecal_sample.tid();
subscription_info.process_id = std::to_string(ecal_sample.pid());
SDataTypeInformation topic_information{ eCALSampleToTopicInformation(ecal_sample_) };
const SDataTypeInformation topic_information{ eCALSampleToTopicInformation(ecal_sample_) };

std::string reader_par;
for (const auto& layer : ecal_sample.tlayer())
Expand Down Expand Up @@ -169,7 +169,7 @@ namespace eCAL
subscription_info.host_name = ecal_sample.hname();
subscription_info.topic_id = ecal_sample.tid();
subscription_info.process_id = std::to_string(ecal_sample.pid());
SDataTypeInformation topic_information{ eCALSampleToTopicInformation(ecal_sample_) };
const SDataTypeInformation topic_information{ eCALSampleToTopicInformation(ecal_sample_) };

std::string reader_par;
for (const auto& layer : ecal_sample.tlayer())
Expand Down Expand Up @@ -218,7 +218,7 @@ namespace eCAL

// refresh publisher registrations
const std::shared_lock<std::shared_timed_mutex> lock(m_topic_name_datawriter_sync);
for (auto iter : m_topic_name_datawriter_map)
for (const auto& iter : m_topic_name_datawriter_map)
{
iter.second->RefreshRegistration();
}
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/pubsub/ecal_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ namespace eCAL

std::string CPublisher::GetTypeName() const
{
SDataTypeInformation info = GetDataTypeInformation();
const SDataTypeInformation info = GetDataTypeInformation();
return(Util::CombinedTopicEncodingAndType(info.encoding, info.name));
}

Expand Down
6 changes: 3 additions & 3 deletions ecal/core/src/pubsub/ecal_subgate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace eCAL
if (topic_name.empty()) return;

const std::string& topic_id = ecal_sample.tid();
SDataTypeInformation topic_info{ eCALSampleToTopicInformation(ecal_sample_) };
const SDataTypeInformation topic_info{ eCALSampleToTopicInformation(ecal_sample_) };

// store description
ApplyTopicToDescGate(topic_name, topic_info);
Expand Down Expand Up @@ -313,7 +313,7 @@ namespace eCAL
const std::string& host_name = ecal_sample.hname();
const std::string& topic_name = ecal_sample.tname();
const std::string& topic_id = ecal_sample.tid();
SDataTypeInformation topic_info{ eCALSampleToTopicInformation(ecal_sample_) };
const SDataTypeInformation topic_info{ eCALSampleToTopicInformation(ecal_sample_) };
const std::string process_id = std::to_string(ecal_sample.pid());

// store description
Expand Down Expand Up @@ -361,7 +361,7 @@ namespace eCAL

// refresh reader registrations
const std::shared_lock<std::shared_timed_mutex> lock(m_topic_name_datareader_sync);
for (auto iter : m_topic_name_datareader_map)
for (const auto& iter : m_topic_name_datareader_map)
{
iter.second->RefreshRegistration();
}
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/pubsub/ecal_subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace eCAL
std::string CSubscriber::GetTypeName() const
{
if(m_datareader == nullptr) return("");
SDataTypeInformation info = m_datareader->GetDataTypeInformation();
const SDataTypeInformation info = m_datareader->GetDataTypeInformation();
return(Util::CombinedTopicEncodingAndType(info.encoding, info.name));
}

Expand Down

0 comments on commit 5cd4c7c

Please sign in to comment.