Skip to content

Commit

Permalink
#1469: util: abstract into variable for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 24, 2021
1 parent 6d0ea70 commit 96110b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vt/utils/compress/compressor.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ namespace vt { namespace util { namespace compress {

template <typename StreamLike>
bool Compressor::write(StreamLike& s, uint8_t const* buffer, std::size_t const size) {
return writeImpl(s, buffer, size, false);
constexpr auto finish_writing = false;
return writeImpl(s, buffer, size, finish_writing);
}

template <typename StreamLike>
Expand Down Expand Up @@ -82,7 +83,8 @@ bool Compressor::writeImpl(

template <typename StreamLike>
bool Compressor::finish(StreamLike& s) {
return writeImpl(s, nullptr, 0, true);
constexpr auto finish_writing = true;
return writeImpl(s, nullptr, 0, finish_writing);
}

}}} /* end namespace vt::util::compress */
Expand Down

0 comments on commit 96110b3

Please sign in to comment.