musikcube
musikcube copied to clipboard
LibraryFactory::CreateLibrary
for (size_t i = 0; i < libraries.size(); i++) {
std::string n = libraries.at(i);
int id = prefs->GetInt(name);
if (n == name) {
/* we already created a library with this name, let's go ahead
and look it up and return it. */
existingId = id;
break;
}
if (id > nextId) {
nextId = id;
}
}
I think int id = prefs->GetInt(name);
should be int id = prefs->GetInt(n);
, that make sense.