MCPcopy Create free account
hub / github.com/MultiMC/Launcher / getIdMapping

Function getIdMapping

launcher/InstanceList.cpp:310–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310static QMap<InstanceId, InstanceLocator> getIdMapping(const QList<InstancePtr> &list)
311{
312 QMap<InstanceId, InstanceLocator> out;
313 int i = 0;
314 for(auto & item: list)
315 {
316 auto id = item->id();
317 if(out.contains(id))
318 {
319 qWarning() << "Duplicate ID" << id << "in instance list";
320 }
321 out[id] = std::make_pair(item, i);
322 i++;
323 }
324 return out;
325}
326
327QList< InstanceId > InstanceList::discoverInstances()
328{

Callers 1

loadListMethod · 0.85

Calls 2

idMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected