merlimat commented on code in PR #527:
URL: https://github.com/apache/pulsar-client-cpp/pull/527#discussion_r2596423483


##########
lib/ProtobufNativeSchema.cc:
##########
@@ -39,8 +39,8 @@ SchemaInfo createProtobufNativeSchema(const 
google::protobuf::Descriptor* descri
     }
 
     const auto fileDescriptor = descriptor->file();
-    const std::string& rootMessageTypeName = descriptor->full_name();
-    const std::string& rootFileDescriptorName = fileDescriptor->name();
+    const std::string& rootMessageTypeName = 
std::string(descriptor->full_name());
+    const std::string& rootFileDescriptorName = 
std::string(fileDescriptor->name());

Review Comment:
   Wouldn't the explicit conversion also happen if we don't use a reference 
here?
   
   ```suggestion
       std::string rootMessageTypeName = descriptor->full_name();
       std::string rootFileDescriptorName = fileDescriptor->name();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to