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

Function findLibraryByName

launcher/minecraft/LaunchProfile.cpp:130–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130static int findLibraryByName(QList<LibraryPtr> *haystack, const GradleSpecifier &needle)
131{
132 int retval = -1;
133 for (int i = 0; i < haystack->size(); ++i)
134 {
135 if (haystack->at(i)->rawName().matchName(needle))
136 {
137 // only one is allowed.
138 if (retval != -1)
139 return -1;
140 retval = i;
141 }
142 }
143 return retval;
144}
145
146void LaunchProfile::applyMods(const QList<LibraryPtr>& mods)
147{

Callers 2

applyModsMethod · 0.85
applyLibraryMethod · 0.85

Calls 3

matchNameMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected