szaszm commented on code in PR #1676: URL: https://github.com/apache/nifi-minifi-cpp/pull/1676#discussion_r1354270590
########## libminifi/include/core/logging/internal/LogCompressorSink.h: ########## @@ -54,7 +48,7 @@ class LogCompressorSink : public spdlog::sinks::base_sink<std::mutex> { void flush_() override; public: - explicit LogCompressorSink(LogQueueSize cache_size, LogQueueSize compressed_size, std::shared_ptr<logging::Logger> logger); + LogCompressorSink(LogQueueSize cache_size, LogQueueSize compressed_size, const std::shared_ptr<logging::Logger>& logger); Review Comment: I don't think passing shared_ptrs by const ref is normally a good idea. If it takes ownership (like in this case), passing by value (and move to data member in this case) is probably best. If it's observer only, then passing a raw pointer or reference usually works better. Am I missing an important detail? Also, is there any reason to remove explicit? I don't have strong preferences either way for constructors with multiple parameters, I just don't understand why it's changed. -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org