musikcube icon indicating copy to clipboard operation
musikcube copied to clipboard

LibraryFactory::CreateLibrary

Open KangMing-ux opened this issue 2 years ago • 0 comments

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.

KangMing-ux avatar Mar 15 '22 00:03 KangMing-ux