mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Userland: Use File::lines() range-based for loop where appropriate
This commit is contained in:
parent
2c43eaa50c
commit
49ed168ced
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/ccapitalK
Commit: 49ed168ced
Pull-request: https://github.com/SerenityOS/serenity/pull/11173
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/bgianfo
2 changed files with 2 additions and 5 deletions
|
@ -20,9 +20,7 @@ RefPtr<Mesh> WavefrontOBJLoader::load(Core::File& file)
|
|||
dbgln("Wavefront: Loading {}...", file.name());
|
||||
|
||||
// Start reading file line by line
|
||||
for (auto line = file.line_begin(); !line.at_end(); ++line) {
|
||||
auto object_line = *line;
|
||||
|
||||
for (auto object_line : file.lines()) {
|
||||
// Ignore file comments
|
||||
if (object_line.starts_with("#"))
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue