From 0e7d5736c0b66d0639beb395b512416d252d28fb Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Sat, 18 Jun 2022 08:20:34 -0700
Subject: 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.
---
 router/router.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'router/router.cpp')

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;
-- 
cgit v1.2.3