summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/AccumulatedAck.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-04 16:06:05 +0000
committerGordon Sim <gsim@apache.org>2007-10-04 16:06:05 +0000
commit03f1df9ff7894a6d910120c82bba49e6193178ee (patch)
treee27792701ea80e1aa83d1c5730da71502374d25d /cpp/src/qpid/framing/AccumulatedAck.cpp
parentc848c1a4e6be50176f10170c6422c5e4d5385770 (diff)
downloadqpid-python-03f1df9ff7894a6d910120c82bba49e6193178ee.tar.gz
Additional tests and fixes
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@581957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/AccumulatedAck.cpp')
-rw-r--r--cpp/src/qpid/framing/AccumulatedAck.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/framing/AccumulatedAck.cpp b/cpp/src/qpid/framing/AccumulatedAck.cpp
index 219a68b96c..bf53bf0cd6 100644
--- a/cpp/src/qpid/framing/AccumulatedAck.cpp
+++ b/cpp/src/qpid/framing/AccumulatedAck.cpp
@@ -22,12 +22,15 @@
#include <assert.h>
#include <iostream>
+#include <boost/bind.hpp>
using std::list;
using std::max;
using std::min;
using namespace qpid::framing;
+AccumulatedAck::AccumulatedAck(SequenceNumber r) : mark(r) {}
+
void AccumulatedAck::update(SequenceNumber first, SequenceNumber last){
assert(first <= last);
if (last < mark) return;
@@ -103,9 +106,7 @@ void AccumulatedAck::collectRanges(SequenceNumberSet& set) const
void AccumulatedAck::update(const SequenceNumber cumulative, const SequenceNumberSet& range)
{
update(mark, cumulative);
- for (SequenceNumberSet::const_iterator i = range.begin(); i != range.end(); i++) {
- update(*i, *(++i));
- }
+ range.processRanges(*this);
}