diff options
author | Chris Robinson <[email protected]> | 2021-10-08 11:05:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-10-08 11:05:36 -0700 |
commit | e3b8f8fe272503ef7f738da2f577f68b0fe16eeb (patch) | |
tree | dbcedc04132f1471f651984f9b5726678cca3443 /alc/backends/pipewire.cpp | |
parent | 8da4eaff29972aca8932c75084d1f1698da5e762 (diff) |
Make a construct_at method amd use it
Diffstat (limited to 'alc/backends/pipewire.cpp')
-rw-r--r-- | alc/backends/pipewire.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index bbab7204..82b7a22f 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -873,8 +873,8 @@ void EventManager::addCallback(uint32_t id, uint32_t, const char *type, uint32_t /* Initialize the NodeProxy to hold the proxy object, add it to the * active proxy list, and update the sync point. */ - auto *node = ::new(pw_proxy_get_user_data(proxy)) NodeProxy{id, proxy}; - mProxyList.emplace_back(node); + auto *node = static_cast<NodeProxy*>(pw_proxy_get_user_data(proxy)); + mProxyList.emplace_back(al::construct_at(node, id, proxy)); syncInit(); } else if(std::strcmp(type, PW_TYPE_INTERFACE_Metadata) == 0) @@ -902,8 +902,8 @@ void EventManager::addCallback(uint32_t id, uint32_t, const char *type, uint32_t return; } - auto *mdata = ::new(pw_proxy_get_user_data(proxy)) MetadataProxy{id, proxy}; - mDefaultMetadata = mdata; + auto *mdata = static_cast<MetadataProxy*>(pw_proxy_get_user_data(proxy)); + mDefaultMetadata = al::construct_at(mdata, id, proxy); syncInit(); } } |