summaryrefslogtreecommitdiff
path: root/Userland/Applications/3DFileViewer
diff options
context:
space:
mode:
authorSahan Fernando <sahan.h.fernando@gmail.com>2021-12-08 10:56:50 +1100
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-12-12 14:06:38 +0330
commit49ed168cedd2ca544a7d676cb3d7bb1f0197c6de (patch)
tree55e736f4470a3efcd2c6d7e4810fa09ffcb39638 /Userland/Applications/3DFileViewer
parent2c43eaa50ced53571de8a719946d2078fc8ea202 (diff)
downloadserenity-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.cpp4
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;