diff options
| author | Gordon Sim <gsim@apache.org> | 2008-10-24 12:34:29 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-10-24 12:34:29 +0000 |
| commit | 2effbc58544688cfeabc4d7d6dcbd59805233de0 (patch) | |
| tree | 8a3dd46362058dc64dd897e2aa32428b18b748e1 /cpp/src/qpid/broker/SemanticState.cpp | |
| parent | 93b372e4d8d51a3db161a95a8b1884ce6af117fd (diff) | |
| download | qpid-python-2effbc58544688cfeabc4d7d6dcbd59805233de0.tar.gz | |
Revised transactional options to perftest as they could not be used on older boost versions due to ambiguity.
Refactored TxAccept to avoid excessive testing and searching for delivery records.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@707615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SemanticState.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SemanticState.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index 42ef8030a6..76eacb8808 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -549,20 +549,8 @@ Queue::shared_ptr SemanticState::getQueue(const string& name) const { } AckRange SemanticState::findRange(DeliveryId first, DeliveryId last) -{ - ack_iterator start = find_if(unacked.begin(), unacked.end(), boost::bind(&DeliveryRecord::matchOrAfter, _1, first)); - ack_iterator end = start; - - if (start != unacked.end()) { - if (first == last) { - //just acked single element (move end past it) - ++end; - } else { - //need to find end (position it just after the last record in range) - end = find_if(start, unacked.end(), boost::bind(&DeliveryRecord::after, _1, last)); - } - } - return AckRange(start, end); +{ + return DeliveryRecord::findRange(unacked, first, last); } void SemanticState::acquire(DeliveryId first, DeliveryId last, DeliveryIds& acquired) |
