diff options
author | Alan Conway <aconway@apache.org> | 2009-07-14 14:49:33 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-07-14 14:49:33 +0000 |
commit | 141f7814e093845265b24c47509fb0a9047c1881 (patch) | |
tree | 7f4fda51f6bf4eec62f332d4c44bf353c08913a5 /cpp/src/qpid/cluster/ErrorCheck.h | |
parent | 8978cf64e20e9cc89aa973ea7cce2ed3c85ec568 (diff) | |
download | qpid-python-141f7814e093845265b24c47509fb0a9047c1881.tar.gz |
Minor cluster optimizations.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ErrorCheck.h')
-rw-r--r-- | cpp/src/qpid/cluster/ErrorCheck.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/ErrorCheck.h b/cpp/src/qpid/cluster/ErrorCheck.h index 51312046b8..550cd36b75 100644 --- a/cpp/src/qpid/cluster/ErrorCheck.h +++ b/cpp/src/qpid/cluster/ErrorCheck.h @@ -62,11 +62,14 @@ class ErrorCheck /**@pre canProcess **/ EventFrame getNext(); - bool canProcess() const; + bool canProcess() const { return type == NONE && !frames.empty(); } + + bool isUnresolved() const { return type != NONE; } + - bool isUnresolved() const; private: + static const ErrorType NONE = framing::cluster::ERROR_TYPE_NONE; typedef std::deque<EventFrame> FrameQueue; FrameQueue::iterator review(const FrameQueue::iterator&); void checkResolved(); |