Use remove_first_if instead of remove_locked_first_if when possible

This commit is contained in:
Maschell
2024-03-30 12:06:47 +01:00
parent f7c9dc445c
commit 004df036b8
3 changed files with 4 additions and 3 deletions

View File

@@ -186,7 +186,7 @@ namespace WUPSConfigAPIBackend {
if (!remove_locked_first_if(sConfigCategoryMutex, sConfigCategories, [&handle](auto &cur) { return handle == cur.get(); })) {
{
// Ignore any attempts to destroy to create root item.
// Ignore any attempts to destroy the root item.
std::lock_guard lock(sConfigsMutex);
if (std::any_of(sConfigs.begin(), sConfigs.end(), [&handle](auto &cur) { return handle == cur.get(); })) {
return WUPSCONFIG_API_RESULT_SUCCESS;