...
This commit is contained in:
@@ -122,7 +122,7 @@ public:
|
||||
|
||||
AdcGenericDevice& addCommand(CommandT&& cmd)
|
||||
{
|
||||
_deviceCommands.insert(std::move(cmd));
|
||||
_deviceCommands.insert({cmd.ident(), std::move(cmd)});
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -131,9 +131,10 @@ public:
|
||||
template <typename... CtorArgTs>
|
||||
AdcGenericDevice& addCommand(CtorArgTs&&... ctor_args)
|
||||
{
|
||||
_deviceCommands.emplace(std::forward<CtorArgTs>(ctor_args)...);
|
||||
// _deviceCommands.emplace(std::forward<CtorArgTs>(ctor_args)...);
|
||||
return addCommand({std::forward<CtorArgTs>(ctor_args)...});
|
||||
|
||||
return *this;
|
||||
// return *this;
|
||||
}
|
||||
|
||||
AdcGenericDevice& delCommand(const cmd_ident_t& cmd_ident)
|
||||
@@ -146,7 +147,7 @@ public:
|
||||
|
||||
AdcGenericDevice& addAttribute(AttributeT&& attr)
|
||||
{
|
||||
_deviceAttributes.insert(std::move(attr));
|
||||
_deviceAttributes.insert({attr.ident(), std::move(attr)});
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -154,9 +155,11 @@ public:
|
||||
template <typename... CtorArgTs>
|
||||
AdcGenericDevice& addAttribute(CtorArgTs&&... ctor_args)
|
||||
{
|
||||
_deviceAttributes.emplace(std::forward<CtorArgTs>(ctor_args)...);
|
||||
// _deviceAttributes.emplace(std::forward<CtorArgTs>(ctor_args)...);
|
||||
|
||||
return *this;
|
||||
return addAttribute({std::forward<CtorArgTs>(ctor_args)...});
|
||||
|
||||
// return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user