X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fwildcard.cpp;h=98ff880b297b1c4c8ed88f45f0219f772f6b35d3;hp=6f96a04685488a2d61c3edab3524e2876f31833e;hb=0256e2fe48a0ecce79c37ac209620ca852b7f11a;hpb=75b1f2213aa6dc0e563b8ad6202522a5f40cb5be diff --git a/ginac/wildcard.cpp b/ginac/wildcard.cpp index 6f96a046..98ff880b 100644 --- a/ginac/wildcard.cpp +++ b/ginac/wildcard.cpp @@ -23,6 +23,7 @@ #include "wildcard.h" #include "archive.h" #include "utils.h" +#include "hash_seed.h" #include @@ -106,8 +107,8 @@ unsigned wildcard::calchash() const // this is where the schoolbook method // (golden_ratio_hash(typeid(*this).name()) ^ label) // is not good enough yet... - const void* this_tinfo = (const void*)typeid(*this).name(); - hashvalue = golden_ratio_hash(golden_ratio_hash((p_int)this_tinfo) ^ label); + unsigned seed = make_hash_seed(typeid(*this)); + hashvalue = golden_ratio_hash(seed ^ label); setflag(status_flags::hash_calculated); return hashvalue; }