Skip to content

Commit

Permalink
MINOR: style enhancement for CompressedInputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Dec 26, 2023
1 parent 2308cdf commit b3210ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cpp/src/arrow/io/compressed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Result<std::shared_ptr<CompressedOutputStream>> CompressedOutputStream::Make(
util::Codec* codec, const std::shared_ptr<OutputStream>& raw, MemoryPool* pool) {
// CAUTION: codec is not owned
std::shared_ptr<CompressedOutputStream> res(new CompressedOutputStream);
res->impl_.reset(new Impl(pool, std::move(raw)));
res->impl_ = std::make_unique<Impl>(pool, std::move(raw));
RETURN_NOT_OK(res->impl_->Init(codec));
return res;
}
Expand Down Expand Up @@ -413,10 +413,9 @@ Result<std::shared_ptr<CompressedInputStream>> CompressedInputStream::Make(
Codec* codec, const std::shared_ptr<InputStream>& raw, MemoryPool* pool) {
// CAUTION: codec is not owned
std::shared_ptr<CompressedInputStream> res(new CompressedInputStream);
res->impl_.reset(new Impl(pool, std::move(raw)));
res->impl_ = std::make_unique<Impl>(pool, std::move(raw));
RETURN_NOT_OK(res->impl_->Init(codec));
return res;
return Status::OK();
}

CompressedInputStream::~CompressedInputStream() { internal::CloseFromDestructor(this); }
Expand Down

0 comments on commit b3210ed

Please sign in to comment.