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 10bd27d
Showing 1 changed file with 16 additions and 9 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,
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,
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 10bd27d

Please sign in to comment.