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

Function findLibraryByName

launcher/minecraft/LaunchProfile.cpp:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static int findLibraryByName(QList<LibraryPtr> *haystack, const GradleSpecifier &needle)
89{
90 int retval = -1;
91 for (int i = 0; i < haystack->size(); ++i)
92 {
93 if (haystack->at(i)->rawName().matchName(needle))
94 {
95 // only one is allowed.
96 if (retval != -1)
97 return -1;
98 retval = i;
99 }
100 }
101 return retval;
102}
103
104void LaunchProfile::applyMods(const QList<LibraryPtr>& mods)
105{

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