Skip to content

Commit

Permalink
clang tidy ecal/core/src/service
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Nov 10, 2023
1 parent 5cd4c7c commit 558bfb1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ecal/core/src/service/ecal_clientgate.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ namespace eCAL
protected:
static std::atomic<bool> m_created;

typedef std::set<CServiceClientImpl*> ServiceNameServiceImplSetT;
using ServiceNameServiceImplSetT = std::set<CServiceClientImpl *>;
std::shared_timed_mutex m_client_set_sync;
ServiceNameServiceImplSetT m_client_set;

typedef Util::CExpMap<std::string, SServiceAttr> ConnectedMapT;
using ConnectedMapT = Util::CExpMap<std::string, SServiceAttr>;
std::shared_timed_mutex m_service_register_map_sync;
ConnectedMapT m_service_register_map;
};
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/service/ecal_service_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ namespace eCAL
};

// Call service asynchronously
bool call_success = client->second->async_call_service(request_shared_ptr, response_callback);
const bool call_success = client->second->async_call_service(request_shared_ptr, response_callback);

if (!call_success)
{
Expand Down
4 changes: 2 additions & 2 deletions ecal/core/src/service/ecal_service_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace eCAL
m_service_id.clear();

{
std::lock_guard<std::mutex> connected_lock(m_connected_mutex);
const std::lock_guard<std::mutex> connected_lock(m_connected_mutex);
m_connected_v0 = false;
m_connected_v1 = false;
}
Expand Down Expand Up @@ -464,7 +464,7 @@ namespace eCAL
bool mode_changed(false);

{
std::lock_guard<std::mutex> connected_lock(m_connected_mutex);
const std::lock_guard<std::mutex> connected_lock(m_connected_mutex);

// protocol version 0
if (m_connected_v0)
Expand Down
8 changes: 4 additions & 4 deletions ecal/core/src/service/ecal_service_singleton_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace eCAL
return nullptr;

// Lock the mutex to actually make it thread safe
std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
const std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
if (!stopped)
{
// Create io_context, if it didn't exist, yet
Expand Down Expand Up @@ -126,7 +126,7 @@ namespace eCAL
return nullptr;

// Lock the mutex to actually make it thread safe
std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
const std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
if (!stopped)
{
// Create io_context, if it didn't exist, yet
Expand Down Expand Up @@ -156,7 +156,7 @@ namespace eCAL

void ServiceManager::stop()
{
std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
const std::lock_guard<std::mutex> singleton_lock(singleton_mutex);

stopped = true;

Expand All @@ -177,7 +177,7 @@ namespace eCAL

void ServiceManager::reset()
{
std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
const std::lock_guard<std::mutex> singleton_lock(singleton_mutex);
stopped = false;
}

Expand Down

0 comments on commit 558bfb1

Please sign in to comment.