summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/QueuedMessage.h
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2009-11-09 18:41:36 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2009-11-09 18:41:36 +0000
commit5801ede4cd403953c0b809c8b2efdbc77fe0e371 (patch)
treeda155eea89966133c075e247a06295220bb01df6 /cpp/src/qpid/broker/QueuedMessage.h
parentd67b869a335e14a6713fcf59cb65b0f05669bb40 (diff)
downloadqpid-python-5801ede4cd403953c0b809c8b2efdbc77fe0e371.tar.gz
remove looping for position search and replace with stl algorithms for better performance
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834172 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/QueuedMessage.h')
-rw-r--r--cpp/src/qpid/broker/QueuedMessage.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/QueuedMessage.h b/cpp/src/qpid/broker/QueuedMessage.h
index ccc9b539df..35e48b11f3 100644
--- a/cpp/src/qpid/broker/QueuedMessage.h
+++ b/cpp/src/qpid/broker/QueuedMessage.h
@@ -38,7 +38,9 @@ struct QueuedMessage
QueuedMessage(Queue* q, boost::intrusive_ptr<Message> msg, framing::SequenceNumber sn) :
payload(msg), position(sn), queue(q) {}
QueuedMessage(Queue* q) : queue(q) {}
+
};
+ inline bool operator<(const QueuedMessage& a, const QueuedMessage& b) { return a.position < b.position; }
}}