diff options
author | Sahan Fernando <sahan.h.fernando@gmail.com> | 2021-12-08 10:56:50 +1100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-12-12 14:06:38 +0330 |
commit | 49ed168cedd2ca544a7d676cb3d7bb1f0197c6de (patch) | |
tree | 55e736f4470a3efcd2c6d7e4810fa09ffcb39638 /Userland/Applications/3DFileViewer | |
parent | 2c43eaa50ced53571de8a719946d2078fc8ea202 (diff) | |
download | serenity-49ed168cedd2ca544a7d676cb3d7bb1f0197c6de.zip |
Userland: Use File::lines() range-based for loop where appropriate
Diffstat (limited to 'Userland/Applications/3DFileViewer')
-rw-r--r-- | Userland/Applications/3DFileViewer/WavefrontOBJLoader.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Applications/3DFileViewer/WavefrontOBJLoader.cpp b/Userland/Applications/3DFileViewer/WavefrontOBJLoader.cpp index 4ef2a87c13..ae239544e5 100644 --- a/Userland/Applications/3DFileViewer/WavefrontOBJLoader.cpp +++ b/Userland/Applications/3DFileViewer/WavefrontOBJLoader.cpp @@ -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; |