From 935eb4cc61797d5176cccd394a318341dad653cf Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 29 Feb 2020 15:31:05 +0100 Subject: [PATCH] Use xxh3 for VarArray hashing. --- server/TracyCharUtil.hpp | 4 +++- server/TracyVarArray.hpp | 23 ++++++----------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/server/TracyCharUtil.hpp b/server/TracyCharUtil.hpp index f8ef14f2..e09db6d6 100644 --- a/server/TracyCharUtil.hpp +++ b/server/TracyCharUtil.hpp @@ -5,7 +5,9 @@ #include #include -#define XXH_STATIC_LINKING_ONLY +#ifndef XXH_STATIC_LINKING_ONLY +# define XXH_STATIC_LINKING_ONLY +#endif #include "tracy_xxh3.h" namespace tracy diff --git a/server/TracyVarArray.hpp b/server/TracyVarArray.hpp index 7ab7c01e..5fa54f5e 100644 --- a/server/TracyVarArray.hpp +++ b/server/TracyVarArray.hpp @@ -4,6 +4,11 @@ #include #include +#ifndef XXH_STATIC_LINKING_ONLY +# define XXH_STATIC_LINKING_ONLY +#endif +#include "tracy_xxh3.h" + #include "../common/TracyForceInline.hpp" #include "TracyCharUtil.hpp" #include "TracyEvent.hpp" @@ -61,23 +66,7 @@ enum { VarArraySize = sizeof( VarArray ) }; template inline void VarArray::CalcHash() { - T hash = 5381; - for( uint8_t i=0; i -inline void VarArray::CalcHash() -{ - uint64_t hash = 5381; - for( uint8_t i=0; i