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

Method getInstanceGroup

launcher/InstanceList.cpp:201–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201GroupId InstanceList::getInstanceGroup(const InstanceId& id) const
202{
203 auto inst = getInstanceById(id);
204 if(!inst)
205 {
206 return GroupId();
207 }
208 auto iter = m_instanceGroupIndex.find(inst->id());
209 if(iter != m_instanceGroupIndex.end())
210 {
211 return *iter;
212 }
213 return GroupId();
214}
215
216void InstanceList::setInstanceGroup(const InstanceId& id, const GroupId& name)
217{

Callers 3

CopyInstanceDialogMethod · 0.80

Calls 3

findMethod · 0.45
idMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected