mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Remove unjustified use of idm::import_existing in sys_config
This commit is contained in:
parent
8b6383b489
commit
114b9498bf
@ -195,11 +195,9 @@ public:
|
||||
template <typename... Args>
|
||||
static std::shared_ptr<lv2_config_handle> create(Args&&... args)
|
||||
{
|
||||
auto cfg = std::make_shared<lv2_config_handle>(std::forward<Args>(args)...);
|
||||
|
||||
if (const u32 idm_id = idm::import_existing<lv2_config_handle>(cfg))
|
||||
if (auto cfg = idm::make_ptr<lv2_config_handle>(std::forward<Args>(args)...))
|
||||
{
|
||||
cfg->idm_id = idm_id;
|
||||
cfg->idm_id = idm::last_id();
|
||||
return cfg;
|
||||
}
|
||||
return nullptr;
|
||||
@ -253,12 +251,10 @@ public:
|
||||
template <typename... Args>
|
||||
static std::shared_ptr<lv2_config_service> create(Args&&... args)
|
||||
{
|
||||
auto service = std::make_shared<lv2_config_service>(std::forward<Args>(args)...);
|
||||
|
||||
if (const u32 idm_id = idm::import_existing<lv2_config_service>(service))
|
||||
if (auto service = idm::make_ptr<lv2_config_service>(std::forward<Args>(args)...))
|
||||
{
|
||||
service->wkptr = service;
|
||||
service->idm_id = idm_id;
|
||||
service->idm_id = idm::last_id();
|
||||
return service;
|
||||
}
|
||||
|
||||
@ -320,12 +316,10 @@ public:
|
||||
template <typename... Args>
|
||||
static std::shared_ptr<lv2_config_service_listener> create(Args&&... args)
|
||||
{
|
||||
auto listener = std::make_shared<lv2_config_service_listener>(std::forward<Args>(args)...);
|
||||
|
||||
if (const u32 idm_id = idm::import_existing<lv2_config_service_listener>(listener))
|
||||
if (auto listener = idm::make_ptr<lv2_config_service_listener>(std::forward<Args>(args)...))
|
||||
{
|
||||
listener->wkptr = listener;
|
||||
listener->idm_id = idm_id;
|
||||
listener->idm_id = idm::last_id();
|
||||
return listener;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user