mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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:
parent
5bb6936a2a
commit
4a1974b174
Notes:
sideshowbarker
2024-07-19 17:13:17 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/4a1974b1745 Pull-request: https://github.com/SerenityOS/serenity/pull/9860 Reviewed-by: https://github.com/itamar8910 ✅
2 changed files with 1 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -36,7 +36,6 @@ private:
|
|||
String to_absolute_path(const String&) const;
|
||||
|
||||
RefPtr<GUI::FileSystemModel> m_model;
|
||||
mutable NonnullRefPtrVector<ProjectFile> m_files;
|
||||
|
||||
String m_root_path;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue