MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / getTrivialRemovals

Function getTrivialRemovals

launcher/minecraft/ComponentUpdateTask.cpp:296–310  ·  view source on GitHub ↗

Get list of uids that can be trivially removed because nothing is depending on them anymore (and they are installed as deps)

Source from the content-addressed store, hash-verified

294
295/// Get list of uids that can be trivially removed because nothing is depending on them anymore (and they are installed as deps)
296static void getTrivialRemovals(const ComponentContainer& components, const RequireExSet& reqs, QStringList& toRemove)
297{
298 for (const auto& component : components) {
299 if (!component->m_dependencyOnly)
300 continue;
301 if (!component->m_cachedVolatile)
302 continue;
303 RequireEx reqNeedle;
304 reqNeedle.uid = component->m_uid;
305 const auto iter = reqs.find(reqNeedle);
306 if (iter == reqs.cend()) {
307 toRemove.append(component->m_uid);
308 }
309 }
310}
311
312/**
313 * handles:

Callers 1

resolveDependenciesMethod · 0.85

Calls 2

appendMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected