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") ``` --- zenutil/zenserverprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zenutil/zenserverprocess.cpp') diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp index 3d9324af9..b43313b7c 100644 --- a/zenutil/zenserverprocess.cpp +++ b/zenutil/zenserverprocess.cpp @@ -376,7 +376,7 @@ ZenServerState::ZenServerEntry::AddSponsorProcess(uint32_t PidToAdd) ////////////////////////////////////////////////////////////////////////// -std::atomic TestCounter{0}; +std::atomic ZenServerTestCounter{0}; ZenServerEnvironment::ZenServerEnvironment() { @@ -416,7 +416,7 @@ ZenServerEnvironment::CreateNewTestDir() using namespace std::literals; ExtendableWideStringBuilder<256> TestDir; - TestDir << "test"sv << int64_t(++TestCounter); + TestDir << "test"sv << int64_t(++ZenServerTestCounter); std::filesystem::path TestPath = m_TestBaseDir / TestDir.c_str(); -- cgit v1.2.3