You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/01/21 12:02:53 UTC

[GitHub] ifplusor commented on a change in pull request #73: [ISSUE #71]Fixed the issue that dangling reference returned when getting message property .

ifplusor commented on a change in pull request #73: [ISSUE #71]Fixed the issue that dangling reference returned when getting message property .
URL: https://github.com/apache/rocketmq-client-cpp/pull/73#discussion_r249424866
 
 

 ##########
 File path: src/message/MQMessage.cpp
 ##########
 @@ -109,9 +112,9 @@ void MQMessage::setPropertyInternal(const string& name, const string& value) {
 
 const string & MQMessage::getProperty(const string& name) const {
 
 Review comment:
   @jonnxu I think 'const string&' is ok. Here, we need return a read-only object or a new one, and return a reference don't allocate a new object.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services