From f1101bbba66dd93a4508143f8fae412ccbb00fbb Mon Sep 17 00:00:00 2001 From: "B. Nicholson" Date: Thu, 4 Jan 2024 20:47:01 -0500 Subject: [PATCH 1/2] Fix syntax error --- simdb.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simdb.hpp b/simdb.hpp index 418df26..1571f00 100644 --- a/simdb.hpp +++ b/simdb.hpp @@ -1344,7 +1344,7 @@ class CncrHsh } template - bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(vi))() ) const + bool runMatch(const void *const key, u32 klen, u32 hash, FUNC f, T defaultRet = decltype(f(VerIdx()))() ) const { using namespace std; From 6a92a2cbd07d4986decc5750ce62c43a277b3791 Mon Sep 17 00:00:00 2001 From: "B. Nicholson" Date: Thu, 4 Jan 2024 21:34:53 -0500 Subject: [PATCH 2/2] Push simdh.hpp variable into a selectany global - in other words let multiple cpp files include the simdb.hpp file without causing a multiply defined variable. --- simdb.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simdb.hpp b/simdb.hpp index 1571f00..3aa3261 100644 --- a/simdb.hpp +++ b/simdb.hpp @@ -221,8 +221,13 @@ #endif //#ifndef NDEBUG +#ifdef WINDOWS + __declspec(selectany) thread_local int __simdb_allocs = 0; + __declspec(selectany) thread_local int __simdb_deallocs = 0; +#elif thread_local int __simdb_allocs = 0; thread_local int __simdb_deallocs = 0; +#endif //#endif namespace {