Agent: Simplify and avoid unnecessary shared_ptr

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2026-01-14 19:27:20 +00:00
parent 77ebf65c7d
commit 248eb13ab9
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
8 changed files with 21 additions and 38 deletions

View file

@ -213,9 +213,9 @@ void LaunchProfile::applyMavenFile(LibraryPtr mavenFile, const RuntimeContext& r
m_mavenFiles.append(Library::limitedCopy(mavenFile));
}
void LaunchProfile::applyAgent(AgentPtr agent, const RuntimeContext& runtimeContext)
void LaunchProfile::applyAgent(const Agent& agent, const RuntimeContext& runtimeContext)
{
auto lib = agent->library();
auto lib = agent.library;
if (!lib->isActive(runtimeContext)) {
return;
}
@ -330,7 +330,7 @@ const QList<LibraryPtr>& LaunchProfile::getMavenFiles() const
return m_mavenFiles;
}
const QList<AgentPtr>& LaunchProfile::getAgents() const
const QList<Agent>& LaunchProfile::getAgents() const
{
return m_agents;
}