Skip to content

Commit

Permalink
Fixed C++ formatting (apache#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Mar 26, 2018
1 parent 665672d commit 3360b14
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pulsar-client-cpp/lib/BatchAcknowledgementTracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ bool BatchAcknowledgementTracker::isBatchReady(const MessageId& msgID,
const proto::CommandAck_AckType ackType) {
Lock lock(mutex_);
// Remove batch index
MessageId batchMessageId = MessageId(msgID.partition(), msgID.ledgerId(), msgID.entryId(),
-1 /* Batch index */);
MessageId batchMessageId =
MessageId(msgID.partition(), msgID.ledgerId(), msgID.entryId(), -1 /* Batch index */);

TrackerMap::iterator pos = trackerMap_.find(batchMessageId);
if (pos == trackerMap_.end() || std::find(sendList_.begin(), sendList_.end(), batchMessageId) != sendList_.end()) {
if (pos == trackerMap_.end() ||
std::find(sendList_.begin(), sendList_.end(), batchMessageId) != sendList_.end()) {
LOG_DEBUG(
"Batch is ready since message present in sendList_ or not present in trackerMap_ [message ID = "
<< batchMessageId << "]");
Expand Down Expand Up @@ -146,8 +147,8 @@ const MessageId BatchAcknowledgementTracker::getGreatestCumulativeAckReady(const
Lock lock(mutex_);

// Remove batch index
MessageId batchMessageId = MessageId(messageId.partition(), messageId.ledgerId(),
messageId.entryId(), -1 /* Batch index */);
MessageId batchMessageId =
MessageId(messageId.partition(), messageId.ledgerId(), messageId.entryId(), -1 /* Batch index */);
TrackerMap::iterator pos = trackerMap_.find(batchMessageId);

// element not found
Expand Down

0 comments on commit 3360b14

Please sign in to comment.