diff --git a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp index a90d04e34ac89c3b420c3841a6d6043fb96e8060..07fe153f34919e29574f602f7f93c2887f288b98 100644 --- a/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp +++ b/source/RobotAPI/libraries/skills/manager/SkillManagerComponentPlugin.cpp @@ -13,7 +13,6 @@ #include <utility> #include <vector> -#include <boost/algorithm/string/case_conv.hpp> #include <boost/locale.hpp> #include <boost/uuid/name_generator.hpp> #include <boost/uuid/nil_generator.hpp> @@ -1345,17 +1344,19 @@ namespace armarx::plugins } const auto& parentId = profile.parentPtr->id; - const auto& nameLowerCase = boost::algorithm::to_lower_copy(profile.name); + const auto& nameLowerCase = simox::alg:to_lower(profile.name); std::unique_lock l(fluxioDC.profilesMutex); - if (std::find_if(fluxioDC.profiles.begin(), - fluxioDC.profiles.end(), - [&profile, &parentId, &nameLowerCase](auto& p) - { - return nameLowerCase == "root" || - (p.parentPtr != nullptr && profile.parentPtr->id == parentId && - boost::algorithm::to_lower(p.second.name) == nameLowerCase); - }) != fluxioDC.profiles.end()) + auto it = std::find_if( + fluxioDC.profiles.begin(), + fluxioDC.profiles.end(), + [&parentId, &nameLowerCase](const std::pair<std::string, skills::FluxioProfile&>& p) + { + return p.second.parentPtr != nullptr && p.second.parentPtr->id == parentId && + simox::alg::to_lower(p.second.name) == nameLowerCase; + }); + + if (nameLowerCase == "root" || it != fluxioDC.profiles.end()) { ARMARX_WARNING << "Profile with name '" << profile.name << "' already exists."; l.unlock();