Skip to content

Commit

Permalink
Apply coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
DongheeYe committed Dec 7, 2018
1 parent 1f8206b commit 0a900e5
Showing 1 changed file with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,19 @@ class ClientListener : public eprosima::fastrtps::SubscriberListener
return list_has_data_.load();
}

void onSubscriptionMatched(eprosima::fastrtps::Subscriber * sub,
eprosima::fastrtps::rtps::MatchingInfo & matchingInfo)
void onSubscriptionMatched(
eprosima::fastrtps::Subscriber * sub,
eprosima::fastrtps::rtps::MatchingInfo & matchingInfo)
{
if (info_ == nullptr || sub == nullptr)
if (info_ == nullptr || sub == nullptr) {
return;
}

if (matchingInfo.status == eprosima::fastrtps::rtps::MATCHED_MATCHING)
if (matchingInfo.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) {
info_->response_subscriber_matched_count_++;
else
} else {
info_->response_subscriber_matched_count_--;
}
}

private:
Expand All @@ -170,20 +173,24 @@ class ClientListener : public eprosima::fastrtps::SubscriberListener
class ClientPubListener : public eprosima::fastrtps::PublisherListener
{
public:
explicit ClientPubListener(CustomClientInfo *info) : info_(info)
explicit ClientPubListener(CustomClientInfo * info)
: info_(info)
{
}

void onPublicationMatched(eprosima::fastrtps::Publisher * pub,
eprosima::fastrtps::rtps::MatchingInfo & matchingInfo)
void onPublicationMatched(
eprosima::fastrtps::Publisher * pub,
eprosima::fastrtps::rtps::MatchingInfo & matchingInfo)
{
if (info_ == nullptr || pub == nullptr)
if (info_ == nullptr || pub == nullptr) {
return;
}

if (matchingInfo.status == eprosima::fastrtps::rtps::MATCHED_MATCHING)
if (matchingInfo.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) {
info_->request_publisher_matched_count_++;
else
} else {
info_->request_publisher_matched_count_--;
}
}

private:
Expand Down

0 comments on commit 0a900e5

Please sign in to comment.