mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibCore: Make IODevice::read_line() return a String
Almost everyone using this API actually wanted String instead of a ByteBuffer anyway, and there were a bunch of slightly different ways clients would convert to String. Let's just cut out all the confusion and make it return String. :^)
This commit is contained in:
@@ -83,8 +83,8 @@ void ConfigFile::reparse()
|
||||
HashMap<String, String>* current_group = nullptr;
|
||||
|
||||
while (file->can_read_line()) {
|
||||
auto line = file->read_line(BUFSIZ);
|
||||
auto* cp = (const char*)line.data();
|
||||
auto line = file->read_line();
|
||||
auto* cp = line.characters();
|
||||
|
||||
while (*cp && (*cp == ' ' || *cp == '\t' || *cp == '\n'))
|
||||
++cp;
|
||||
|
||||
Reference in New Issue
Block a user