File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,11 @@ class mutex {
125
125
IPC_UNUSED_ std::lock_guard<std::mutex> guard {info.lock };
126
126
auto it = info.mutex_handles .find (name);
127
127
if (it == info.mutex_handles .end ()) {
128
- it = info.mutex_handles .emplace (name,
129
- curr_prog::shm_data::init{name}).first ;
128
+ it = info.mutex_handles
129
+ .emplace (
130
+ std::piecewise_construct, std::forward_as_tuple (name),
131
+ std::forward_as_tuple (curr_prog::shm_data::init{name}))
132
+ .first ;
130
133
}
131
134
mutex_ = &it->second .mtx ;
132
135
ref_ = &it->second .ref ;
Original file line number Diff line number Diff line change @@ -55,8 +55,12 @@ class mutex {
55
55
IPC_UNUSED_ std::lock_guard<std::mutex> guard {info.lock };
56
56
auto it = info.mutex_handles .find (name);
57
57
if (it == info.mutex_handles .end ()) {
58
- it = info.mutex_handles .emplace (name,
59
- curr_prog::shm_data::init{name, sizeof (pthread_mutex_t )}).first ;
58
+ it = info.mutex_handles
59
+ .emplace (std::piecewise_construct,
60
+ std::forward_as_tuple (name),
61
+ std::forward_as_tuple (curr_prog::shm_data::init{
62
+ name, sizeof (pthread_mutex_t )}))
63
+ .first ;
60
64
}
61
65
shm_ = &it->second .shm ;
62
66
ref_ = &it->second .ref ;
You can’t perform that action at this time.
0 commit comments