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

Function findLibraryByName

launcher/minecraft/LaunchProfile.cpp:127–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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