1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

Userland: Use File::lines() range-based for loop where appropriate

This commit is contained in:
Sahan Fernando 2021-12-08 10:56:50 +11:00 committed by Ali Mohammad Pur
parent 2c43eaa50c
commit 49ed168ced
2 changed files with 2 additions and 5 deletions

View file

@ -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;