summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/framing
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/framing')
-rw-r--r--qpid/cpp/src/qpid/framing/AMQFrame.h3
-rw-r--r--qpid/cpp/src/qpid/framing/MethodContent.h2
-rw-r--r--qpid/cpp/src/qpid/framing/TransferContent.cpp2
-rw-r--r--qpid/cpp/src/qpid/framing/TransferContent.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/framing/AMQFrame.h b/qpid/cpp/src/qpid/framing/AMQFrame.h
index 4f6faf4199..19675ce6ff 100644
--- a/qpid/cpp/src/qpid/framing/AMQFrame.h
+++ b/qpid/cpp/src/qpid/framing/AMQFrame.h
@@ -43,8 +43,7 @@ class QPID_COMMON_CLASS_EXTERN AMQFrame : public AMQDataBlock
ChannelId getChannel() const { return channel; }
void setChannel(ChannelId c) { channel = c; }
- AMQBody* getBody() { return body.get(); }
- const AMQBody* getBody() const { return body.get(); }
+ AMQBody* getBody() const { return body.get(); }
AMQMethodBody* getMethod() { return getBody() ? getBody()->getMethod() : 0; }
const AMQMethodBody* getMethod() const { return getBody() ? getBody()->getMethod() : 0; }
diff --git a/qpid/cpp/src/qpid/framing/MethodContent.h b/qpid/cpp/src/qpid/framing/MethodContent.h
index b290a0c140..58c9143cfa 100644
--- a/qpid/cpp/src/qpid/framing/MethodContent.h
+++ b/qpid/cpp/src/qpid/framing/MethodContent.h
@@ -32,7 +32,7 @@ class MethodContent
public:
virtual ~MethodContent() {}
//TODO: rethink this interface
- virtual AMQHeaderBody getHeader() const = 0;
+ virtual const AMQHeaderBody& getHeader() const = 0;
virtual const std::string& getData() const = 0;
};
diff --git a/qpid/cpp/src/qpid/framing/TransferContent.cpp b/qpid/cpp/src/qpid/framing/TransferContent.cpp
index 837d7d346a..d997b24304 100644
--- a/qpid/cpp/src/qpid/framing/TransferContent.cpp
+++ b/qpid/cpp/src/qpid/framing/TransferContent.cpp
@@ -30,7 +30,7 @@ TransferContent::TransferContent(const std::string& data, const std::string& key
}
-AMQHeaderBody TransferContent::getHeader() const
+const AMQHeaderBody& TransferContent::getHeader() const
{
return header;
}
diff --git a/qpid/cpp/src/qpid/framing/TransferContent.h b/qpid/cpp/src/qpid/framing/TransferContent.h
index 9a698a1823..32663d7020 100644
--- a/qpid/cpp/src/qpid/framing/TransferContent.h
+++ b/qpid/cpp/src/qpid/framing/TransferContent.h
@@ -40,7 +40,7 @@ public:
QPID_COMMON_EXTERN TransferContent(const std::string& data = std::string(), const std::string& key=std::string());
///@internal
- QPID_COMMON_EXTERN AMQHeaderBody getHeader() const;
+ QPID_COMMON_EXTERN const AMQHeaderBody& getHeader() const;
QPID_COMMON_EXTERN void setData(const std::string&);
QPID_COMMON_EXTERN const std::string& getData() const;