lordgamez commented on code in PR #2148:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2148#discussion_r3100537309
##########
extensions/libarchive/MergeContent.h:
##########
@@ -82,35 +82,39 @@ class BinaryConcatenationMerge : public MergeBin {
std::deque<std::shared_ptr<core::FlowFile>> &flows_;
FlowFileSerializer& serializer_;
- int64_t operator()(const std::shared_ptr<io::OutputStream>& stream) const {
+ io::IoResult operator()(const std::shared_ptr<io::OutputStream>& stream)
const {
size_t write_size_sum = 0;
if (!header_.empty()) {
const auto write_ret = stream->write(reinterpret_cast<const
uint8_t*>(header_.data()), header_.size());
- if (io::isError(write_ret))
- return -1;
+ if (io::isError(write_ret)) {
+ return io::IoResult::error();
+ }
write_size_sum += write_ret;
}
bool isFirst = true;
for (const auto& flow : flows_) {
if (!isFirst && !demarcator_.empty()) {
const auto write_ret = stream->write(reinterpret_cast<const
uint8_t*>(demarcator_.data()), demarcator_.size());
- if (io::isError(write_ret))
- return -1;
+ if (io::isError(write_ret)) {
+ return io::IoResult::error();
+ }
write_size_sum += write_ret;
}
const auto len = serializer_.serialize(flow, stream);
Review Comment:
nitpick: I would rename this as we do not return an integer anymore
--
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]