szaszm commented on code in PR #1648:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1648#discussion_r1326244329


##########
extensions/http-curl/client/HTTPClient.cpp:
##########
@@ -328,18 +325,15 @@ void HTTPClient::setRequestHeader(std::string key, 
std::optional<std::string> va
 }
 
 namespace {
-struct CurlSListFreeAll {
-  void operator()(struct curl_slist* slist) const {
-    curl_slist_free_all(slist);
-  }
-};
+using CurlSlistDeleter = decltype([](struct curl_slist* slist) { 
curl_slist_free_all(slist); });

Review Comment:
   I don't really think saving a few characters of typing with the alias is 
worth the extra mental indirection, I prefer spelling out the actual type of 
`std::unique_ptr<struct curl_slist, CurlSlistDeleter>` in this case. 



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