1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

HackStudio: Remove storing a vector of opened files in Project class

It looks to me like this has the same purpose as m_open_files
in the HackStudioWidget, so removing it shouldn't change anything.
This commit is contained in:
Karol Kosek 2021-08-12 22:22:44 +02:00 committed by Andreas Kling
parent 5bb6936a2a
commit 4a1974b174
2 changed files with 1 additions and 8 deletions

View file

@ -48,13 +48,7 @@ void Project::for_each_text_file(Function<void(const ProjectFile&)> callback) co
NonnullRefPtr<ProjectFile> Project::get_file(const String& path) const
{
auto full_path = to_absolute_path(path);
for (auto& file : m_files) {
if (file.name() == full_path)
return file;
}
auto file = ProjectFile::construct_with_name(full_path);
m_files.append(file);
return file;
return ProjectFile::construct_with_name(full_path);
}
String Project::to_absolute_path(const String& path) const