mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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: 4a1974b174
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue