diff options
author | Chris Robinson <[email protected]> | 2022-06-18 08:20:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-06-18 08:20:34 -0700 |
commit | 0e7d5736c0b66d0639beb395b512416d252d28fb (patch) | |
tree | 0f57f46f74603b4124cf32efcf66189891685192 /router/router.cpp | |
parent | fcc73d332409c31f55c4387a0a94fa3a2830068f (diff) |
Add EFX functions back to the router
They're necessary for proper exports whem building the router. And if there's
ever a spec update that standardizes them, they'll be needed anyway.
Diffstat (limited to 'router/router.cpp')
-rw-r--r-- | router/router.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/router/router.cpp b/router/router.cpp index 67c34812..a0ce165c 100644 --- a/router/router.cpp +++ b/router/router.cpp @@ -17,7 +17,7 @@ #include "version.h" -std::vector<DriverIface> DriverList; +std::vector<DriverIfacePtr> DriverList; thread_local DriverIface *ThreadCtxDriver; @@ -84,13 +84,13 @@ static void AddModule(HMODULE module, const WCHAR *name) { for(auto &drv : DriverList) { - if(drv.Module == module) + if(drv->Module == module) { TRACE("Skipping already-loaded module %p\n", decltype(std::declval<void*>()){module}); FreeLibrary(module); return; } - if(drv.Name == name) + if(drv->Name == name) { TRACE("Skipping similarly-named module %ls\n", name); FreeLibrary(module); @@ -98,8 +98,8 @@ static void AddModule(HMODULE module, const WCHAR *name) } } - DriverList.emplace_back(name, module); - DriverIface &newdrv = DriverList.back(); + DriverList.emplace_back(std::make_unique<DriverIface>(name, module)); + DriverIface &newdrv = *DriverList.back(); /* Load required functions. */ int err = 0; |