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


##########
extensions/rocksdb-repos/tests/SwapTests.cpp:
##########
@@ -56,14 +56,14 @@ class OutputProcessor : public core::ProcessorImpl {
 
   void onTrigger(core::ProcessContext&, core::ProcessSession& session) 
override {
     auto id = std::to_string(next_id_++);
-    auto ff = session.create();
+    const auto ff = session.create();
     ff->addAttribute("index", id);
-    session.write(ff, [&] (const std::shared_ptr<minifi::io::OutputStream>& 
output) -> int64_t {
-      auto ret = output->write(as_bytes(std::span(id)));
-      if (minifi::io::isError(ret)) {
-        return -1;
+    session.write(ff, [&] (const std::shared_ptr<minifi::io::OutputStream>& 
output) -> io::IoResult {
+      const size_t ret = output->write(as_bytes(std::span(id)));
+      if (io::isError(ret)) {
+        return io::IoResult::error();
       }
-      return gsl::narrow<int64_t>(ret);
+      return io::IoResult::fromSizeT(ret);

Review Comment:
   👍 
https://github.com/apache/nifi-minifi-cpp/commit/21f5ece018ff1324ddb15bf6c4bed0c126a127ab#diff-204b48ece2bb6eb91b320c67870d012681c2d1d60002c4802db64731da5c84a8L63-L65



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