diff options
Diffstat (limited to 'cpp/src/qpid/framing/MethodHolder.h')
| -rw-r--r-- | cpp/src/qpid/framing/MethodHolder.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/qpid/framing/MethodHolder.h b/cpp/src/qpid/framing/MethodHolder.h index 59dbb1a708..a8bc8f2728 100644 --- a/cpp/src/qpid/framing/MethodHolder.h +++ b/cpp/src/qpid/framing/MethodHolder.h @@ -75,13 +75,13 @@ class MethodHolder void encode(Buffer&) const; void decode(Buffer&); uint32_t size() const; - - AMQMethodBody* get() { - return reinterpret_cast<AMQMethodBody*>(blob.get()); - } - const AMQMethodBody* get() const { - return reinterpret_cast<const AMQMethodBody*>(blob.get()); - } + + /** Return method pointer or 0 if empty. */ + AMQMethodBody* get(); + const AMQMethodBody* get() const; + + /** True if no method has been set */ + bool empty() const { return blob.empty(); } private: Blob<MAX_METHODBODY_SIZE> blob; |
