diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-07 19:55:44 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-07 20:32:31 +0100 |
commit | a6ad68190fb02af9c89dc461f451bb75c8a10a94 (patch) | |
tree | a1fd04b7356286f49d1624d81be53af5b9609145 /src/core/hle/service/service.cpp | |
parent | Merge pull request #438 from lioncash/swp (diff) | |
download | yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar.gz yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar.bz2 yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar.lz yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar.xz yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.tar.zst yuzu-a6ad68190fb02af9c89dc461f451bb75c8a10a94.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/service.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index c5233e687..0c5597283 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -46,36 +46,22 @@ Manager* g_manager = nullptr; ///< Service manager //////////////////////////////////////////////////////////////////////////////////////////////////// // Service Manager class -Manager::Manager() { -} - -Manager::~Manager() { - for(Interface* service : m_services) { - DeleteService(service->GetPortName()); - } -} - -/// Add a service to the manager (does not create it though) void Manager::AddService(Interface* service) { // TOOD(yuriks): Fix error reporting m_port_map[service->GetPortName()] = Kernel::g_handle_table.Create(service).ValueOr(INVALID_HANDLE); m_services.push_back(service); } -/// Removes a service from the manager, also frees memory void Manager::DeleteService(const std::string& port_name) { Interface* service = FetchFromPortName(port_name); m_services.erase(std::remove(m_services.begin(), m_services.end(), service), m_services.end()); m_port_map.erase(port_name); - delete service; } -/// Get a Service Interface from its Handle Interface* Manager::FetchFromHandle(Handle handle) { return Kernel::g_handle_table.Get<Interface>(handle); } -/// Get a Service Interface from its port Interface* Manager::FetchFromPortName(const std::string& port_name) { auto itr = m_port_map.find(port_name); if (itr == m_port_map.end()) { |