diff options
Diffstat (limited to 'qpid/cpp/src/qpid/client/TypedResult.h')
-rw-r--r-- | qpid/cpp/src/qpid/client/TypedResult.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/client/TypedResult.h b/qpid/cpp/src/qpid/client/TypedResult.h index 5306997d74..2e54f9fdfc 100644 --- a/qpid/cpp/src/qpid/client/TypedResult.h +++ b/qpid/cpp/src/qpid/client/TypedResult.h @@ -23,6 +23,7 @@ #define _TypedResult_ #include "Completion.h" +#include "qpid/framing/StructHelper.h" namespace qpid { namespace client { @@ -39,7 +40,7 @@ template <class T> class TypedResult : public Completion public: ///@internal - TypedResult(Future f, shared_ptr<SessionImpl> s) : Completion(f, s), decoded(false) {} + TypedResult(CompletionImpl* c) : Completion(c), decoded(false) {} /** * Wait for the asynchronous command that returned this TypedResult to complete @@ -49,13 +50,12 @@ public: *@exception If the command returns an error, get() throws an exception. * */ - T& get() - { + T& get() { if (!decoded) { - future.decodeResult(result, *session); + framing::StructHelper helper; + helper.decode(result, getResult()); decoded = true; } - return result; } }; |