From 1edaefca3ae1bb0aabc2218cbba1c875a2ef44ed Mon Sep 17 00:00:00 2001 From: Itamar Date: Fri, 5 Mar 2021 16:54:27 +0200 Subject: [PATCH] HackStudio: Remove redundant null check when creating a new project file Project::get_file returns a NonNullRefPtr --- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index c665022911..2bd45a0638 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -236,9 +236,6 @@ void HackStudioWidget::open_file(const String& full_filename) new_project_file = it->value; } else { new_project_file = m_project->get_file(filename); - if (!new_project_file) { - new_project_file = ProjectFile::construct_with_name(filename); - } m_open_files.set(filename, *new_project_file); m_open_files_vector.append(filename); m_open_files_view->model()->update();