fix: pass reference instead copy of argument in util/edge

This commit is contained in:
Konstantin Akimov 2024-06-12 22:17:35 +07:00
parent 9d941aacb9
commit b799683d60
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ EdgeTriggeredEvents::~EdgeTriggeredEvents()
}
}
bool EdgeTriggeredEvents::RegisterEntity(int entity, std::string entity_name) const
bool EdgeTriggeredEvents::RegisterEntity(int entity, const std::string& entity_name) const
{
assert(m_valid);
@ -97,7 +97,7 @@ bool EdgeTriggeredEvents::RegisterEntity(int entity, std::string entity_name) co
return true;
}
bool EdgeTriggeredEvents::UnregisterEntity(int entity, std::string entity_name) const
bool EdgeTriggeredEvents::UnregisterEntity(int entity, const std::string& entity_name) const
{
assert(m_valid);

View File

@ -44,8 +44,8 @@ private:
bool UnregisterPipe(int wakeup_pipe);
private:
bool RegisterEntity(int entity, std::string entity_name) const;
bool UnregisterEntity(int entity, std::string entity_name) const;
bool RegisterEntity(int entity, const std::string& entity_name) const;
bool UnregisterEntity(int entity, const std::string& entity_name) const;
private:
/* Flag set if pipe has been registered with instance */