From d5871f5717579fab3c093537c44e3cd467560cdd Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 24 Feb 2023 22:38:01 +0100 Subject: AK: Rename Stream::{read,write} to Stream::{read_some,write_some} Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs. --- Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Applications/KeyboardMapper') diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 438212deb6..3695aadfc8 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -191,7 +191,8 @@ ErrorOr KeyboardMapperWidget::save_to_file(StringView filename) // Write to file. DeprecatedString file_content = map_json.to_deprecated_string(); auto file = TRY(Core::File::open(filename, Core::File::OpenMode::Write)); - TRY(file->write(file_content.bytes())); + // FIXME: This should write the entire span. + TRY(file->write_some(file_content.bytes())); file->close(); window()->set_modified(false); -- cgit v1.2.3