martinzink commented on code in PR #1383:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1383#discussion_r954900043


##########
libminifi/include/utils/BaseHTTPClient.h:
##########
@@ -51,38 +39,22 @@ struct HTTPProxy {
   int port = 0;
 };
 
-struct HTTPUploadCallback {
-  HTTPUploadCallback() {
-    stop = false;
-    ptr = nullptr;
-    pos = 0;
-  }
-  std::mutex mutex;
-  std::atomic<bool> stop;
-  ByteInputCallback *ptr;
-  size_t pos;
-
-  size_t getPos() {
-    std::lock_guard<std::mutex> lock(mutex);
-    return pos;
-  }
+class HTTPUploadCallback : public ByteInputCallback {
+ public:
+  template<typename... Args>
+  explicit HTTPUploadCallback(Args&& ... args) : 
ByteInputCallback(std::forward<Args>(args)...) {}

Review Comment:
   makes it much cleaner :+1: , 
https://github.com/apache/nifi-minifi-cpp/pull/1383/commits/044ce269808a28e5a6eaeca34fb30747426a6ab7#diff-5b5811eda1c034612f091f1dfe2d4631d0c7df105969f9c12737224eae603a30R44



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