MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / getIdMapping

Function getIdMapping

launcher/InstanceList.cpp:366–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366static QMap<InstanceId, InstanceLocator> getIdMapping(const QList<InstancePtr>& list)
367{
368 QMap<InstanceId, InstanceLocator> out;
369 int i = 0;
370 for (auto& item : list) {
371 auto id = item->id();
372 if (out.contains(id)) {
373 qWarning() << "Duplicate ID" << id << "in instance list";
374 }
375 out[id] = std::make_pair(item, i);
376 i++;
377 }
378 return out;
379}
380
381QList<InstanceId> InstanceList::discoverInstances()
382{

Callers 1

loadListMethod · 0.85

Calls 2

idMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected