arpadboda commented on a change in pull request #754:
URL: https://github.com/apache/nifi-minifi-cpp/pull/754#discussion_r417874613



##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -251,26 +251,26 @@ class FlowFileResponder : public CivetHandler {
   bool handleGet(CivetServer *server, struct mg_connection *conn) {
 
     if (flow_files_feed_->size_approx() > 0) {
-      std::shared_ptr<FlowObj> flow;
+      std::shared_ptr<FlowObj> flowobj;
       uint8_t buf[1];
       std::vector<std::shared_ptr<FlowObj>> flows;
       uint64_t total = 0;
 
-      while (flow_files_feed_->try_dequeue(flow)) {
-        flows.push_back(flow);
-        total += flow->total_size;
+      while (flow_files_feed_->try_dequeue(flowobj)) {
+        flows.push_back(flowobj);
+        total += flowobj->total_size;
       }
       mg_printf(conn, "HTTP/1.1 200 OK\r\n"
-                "Content-Length: %llu\r\n"
+                      "Content-Length: %" PRIu64 "\r\n"

Review comment:
       This line seems to be overindented compared to the others. 

##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -15,34 +15,34 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#ifndef LIBMINIFI_TEST_CURL_TESTS_SITETOSITEHTTP_HTTPHANDLERS_H_
+#define LIBMINIFI_TEST_CURL_TESTS_SITETOSITEHTTP_HTTPHANDLERS_H_
+
 #include "civetweb.h"
 #include "CivetServer.h"
 #include "concurrentqueue.h"
 #include "CivetStream.h"
 #include "io/CRCStream.h"
 #include "rapidjson/document.h"
+#include <cinttypes>
+#include <utility>
 
-#ifndef LIBMINIFI_TEST_CURL_TESTS_SITETOSITEHTTP_HTTPHANDLERS_H_
-#define LIBMINIFI_TEST_CURL_TESTS_SITETOSITEHTTP_HTTPHANDLERS_H_
 static std::atomic<int> transaction_id;
 static std::atomic<int> transaction_id_output;
 
 class FlowObj {
  public:
-  FlowObj()
-      : total_size(0) {
+  FlowObj() = default;
 
-  }
-  explicit FlowObj(const FlowObj &&other)
-      : total_size(std::move(other.total_size)),
+  FlowObj(FlowObj &&other) noexcept
+      : total_size(other.total_size),
         attributes(std::move(other.attributes)),
-        data(std::move(other.data)) {
+        data(std::move(other.data))
+  { }
 
-  }
-  uint64_t total_size;
+  uint64_t total_size{0};

Review comment:
       I know this is old code, but as we touch this, could you rename the 
members to follow the regular coding style we use? (ending with underscore)




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