Skip to content

Commit

Permalink
use braces for constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Mar 25, 2020
1 parent 5f0023a commit deccdf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmw_cyclonedds_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2219,9 +2219,9 @@ static void clean_waitset_caches()
have been cached in a waitset), and drops all cached entities from all waitsets (just to keep
life simple). I'm assuming one is not allowed to delete an entity while it is still being
used ... */
std::lock_guard<std::mutex> lock(gcdds.lock);
std::lock_guard<std::mutex> lock{gcdds.lock};
for (auto && ws : gcdds.waitsets) {
std::unique_lock<std::mutex> lock2(ws->lock, std::try_to_lock);
std::unique_lock<std::mutex> lock2{ws->lock, std::try_to_lock};
if (lock2.owns_lock()) {
waitset_detach(ws);
}
Expand Down

0 comments on commit deccdf7

Please sign in to comment.