time: Simplify interface creation

We can use one instance of the interface instead of duplicating code.
This commit is contained in:
Lioncash
2018-07-24 02:45:23 -04:00
parent 47ac369180
commit a61124a9e7
6 changed files with 15 additions and 64 deletions

View File

@ -9,9 +9,8 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h"
#include "core/hle/service/time/interface.h"
#include "core/hle/service/time/time.h"
#include "core/hle/service/time/time_s.h"
#include "core/hle/service/time/time_u.h"
namespace Service::Time {
@ -212,8 +211,8 @@ Module::Interface::Interface(std::shared_ptr<Module> time, const char* name)
void InstallInterfaces(SM::ServiceManager& service_manager) {
auto time = std::make_shared<Module>();
std::make_shared<TIME_S>(time)->InstallAsService(service_manager);
std::make_shared<TIME_U>(time)->InstallAsService(service_manager);
std::make_shared<TIME>(time, "time:s")->InstallAsService(service_manager);
std::make_shared<TIME>(time, "time:u")->InstallAsService(service_manager);
}
} // namespace Service::Time