From 075f539480de74f7fa65e2b27b20853f99bf3c61 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 25 Jul 2021 00:41:46 +0200 Subject: [PATCH] Avoid copying strings when splitting lock names for custom command --- librepomgr/buildactions/customcommand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librepomgr/buildactions/customcommand.cpp b/librepomgr/buildactions/customcommand.cpp index 1b3c958..06b6cd0 100644 --- a/librepomgr/buildactions/customcommand.cpp +++ b/librepomgr/buildactions/customcommand.cpp @@ -77,8 +77,8 @@ void CustomCommand::run() // acquire locks // note: Using an std::set here (instead of a std::vector) to ensure we don't attempt to acquire the same lock twice and to ensure // locks are always acquired in the same order (to prevent deadlocks). - const auto sharedLockNames = splitStringSimple>(findSetting(sharedLocksSetting), ","); - const auto exclusiveLockNames = splitStringSimple>(findSetting(exclusiveLocksSetting), ","); + const auto sharedLockNames = splitStringSimple>(findSetting(sharedLocksSetting), ","); + const auto exclusiveLockNames = splitStringSimple>(findSetting(exclusiveLocksSetting), ","); auto &locks = process->locks(); auto &log = m_buildAction->log(); locks.reserve(sharedLockNames.size() + exclusiveLockNames.size());