From 9fb9d6ce5aaedd4ecf4f7bdc9c33a94b1e6597b2 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 19 Apr 2023 10:43:28 +0200 Subject: tweaks for enabling unity builds mostly changes to make sure anonymous namespaces don't clash and a change to avoid windows headers from leaking into other compilation units unity builds are not yet enabled by default, but can be enabled by uncommenting this line in the root `xmake.lua` ``` --add_rules("c++.unity_build") ``` --- zenhttp/httpserver.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'zenhttp/httpserver.cpp') diff --git a/zenhttp/httpserver.cpp b/zenhttp/httpserver.cpp index 952857f2c..3576d9b3d 100644 --- a/zenhttp/httpserver.cpp +++ b/zenhttp/httpserver.cpp @@ -4,7 +4,6 @@ #include "httpasio.h" #include "httpnull.h" -#include "httpsys.h" #include #include @@ -705,6 +704,9 @@ enum class HttpServerClass kHttpNull }; +// Implemented in httpsys.cpp +Ref CreateHttpSysServer(int Concurrency, int BackgroundWorkerThreads); + Ref CreateHttpServer(std::string_view ServerClass) { @@ -741,7 +743,7 @@ CreateHttpServer(std::string_view ServerClass) #if ZEN_WITH_HTTPSYS case HttpServerClass::kHttpSys: ZEN_INFO("using http.sys server implementation"); - return new HttpSysServer(std::thread::hardware_concurrency(), /* background worker threads */ 16); + return CreateHttpSysServer(std::thread::hardware_concurrency(), /* background worker threads */ 16); #endif case HttpServerClass::kHttpNull: -- cgit v1.2.3