mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted
No functional changes.
This commit is contained in:
parent
a3f73e7d85
commit
ecd1862859
46 changed files with 141 additions and 141 deletions
|
@ -18,7 +18,7 @@ static ErrorOr<void> decompress_file(NonnullOwnPtr<Core::File> input_stream, Str
|
|||
auto buffer = TRY(ByteBuffer::create_uninitialized(4096));
|
||||
while (!gzip_stream.is_eof()) {
|
||||
auto span = TRY(gzip_stream.read_some(buffer));
|
||||
TRY(output_stream.write_entire_buffer(span));
|
||||
TRY(output_stream.write_until_depleted(span));
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
@ -57,7 +57,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
output_bytes = TRY(Compress::GzipCompressor::compress_all(input_bytes));
|
||||
|
||||
auto output_stream = write_to_stdout ? TRY(Core::File::standard_output()) : TRY(Core::File::open(output_filename, Core::File::OpenMode::Write));
|
||||
TRY(output_stream->write_entire_buffer(output_bytes));
|
||||
TRY(output_stream->write_until_depleted(output_bytes));
|
||||
|
||||
if (!keep_input_files) {
|
||||
TRY(Core::System::unlink(input_filename));
|
||||
|
|
|
@ -145,7 +145,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
if (!dump_out_path.is_empty()) {
|
||||
auto output_stream = TRY(Core::File::open(dump_out_path, Core::File::OpenMode::Write));
|
||||
TRY(output_stream->write_entire_buffer(icc_bytes));
|
||||
TRY(output_stream->write_until_depleted(icc_bytes));
|
||||
}
|
||||
return Gfx::ICC::Profile::try_load_from_externally_owned_memory(icc_bytes);
|
||||
}());
|
||||
|
@ -153,7 +153,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (!reencode_out_path.is_empty()) {
|
||||
auto reencoded_bytes = TRY(Gfx::ICC::encode(profile));
|
||||
auto output_stream = TRY(Core::File::open(reencode_out_path, Core::File::OpenMode::Write));
|
||||
TRY(output_stream->write_entire_buffer(reencoded_bytes));
|
||||
TRY(output_stream->write_until_depleted(reencoded_bytes));
|
||||
}
|
||||
|
||||
bool do_print = (dump_out_path.is_empty() && reencode_out_path.is_empty()) || force_print;
|
||||
|
|
|
@ -56,7 +56,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}
|
||||
|
||||
auto output_stream = TRY(Core::File::open(out_path, Core::File::OpenMode::Write));
|
||||
TRY(output_stream->write_entire_buffer(bytes));
|
||||
TRY(output_stream->write_until_depleted(bytes));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue