adamdebreceni commented on a change in pull request #900:
URL: https://github.com/apache/nifi-minifi-cpp/pull/900#discussion_r486855212



##########
File path: extensions/bustache/ApplyTemplate.h
##########
@@ -61,7 +61,7 @@ class ApplyTemplate : public core::Processor {
   class WriteCallback : public OutputStreamCallback {
    public:
     WriteCallback(const std::string &templateFile, const 
std::shared_ptr<core::FlowFile> &flow_file);
-    int64_t process(std::shared_ptr<io::BaseStream> stream);
+    int64_t process(const std::shared_ptr<io::BaseStream>& stream);

Review comment:
       I would say, that using `const shared_ptr<>&` is certainly an 
improvement, as @lordgamez said it does not force us to take ownership, and it 
is agreement with the proliferation of managed pointers in the rest of the 
system (so it lets us call into interfaces expecting a managed ptr), I don't 
have a strong opinion about it though, because I plan on removing the whole 
`*StreamCallback` stuff, so if you feel like it should be changed, decide which 
one it should be:
   
   1. `shared_ptr<BaseStream>`
   2. `const shared_ptr<BaseStream>&`
   3. `BaseStream&`
   4. `BaseStream*`
   5. `gsl::not_null<BaseStream*>`




----------------------------------------------------------------
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.

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


Reply via email to