瀏覽代碼

HackStudio: Do not check NonnullRefPtr for null value

Daniel Bertalan 4 年之前
父節點
當前提交
01a0aa6e0b
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Userland/DevTools/HackStudio/Project.cpp

+ 1 - 2
Userland/DevTools/HackStudio/Project.cpp

@@ -41,8 +41,7 @@ void Project::for_each_text_file(Function<void(const ProjectFile&)> callback) co
 {
 {
     traverse_model(model(), {}, [&](auto& index) {
     traverse_model(model(), {}, [&](auto& index) {
         auto file = get_file(model().full_path(index));
         auto file = get_file(model().full_path(index));
-        if (file)
-            callback(*file);
+        callback(*file);
     });
     });
 }
 }