X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fwildcard.cpp;h=c691e33585f5cf6fb49d64329c22cda765cd2430;hp=6f96a04685488a2d61c3edab3524e2876f31833e;hb=cca88b51436e4b654d16a4d60cd0d1c66fcf5dd6;hpb=1602530f716ba1d425a0667b897182b99c374823 diff --git a/ginac/wildcard.cpp b/ginac/wildcard.cpp index 6f96a046..c691e335 100644 --- a/ginac/wildcard.cpp +++ b/ginac/wildcard.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's wildcard objects. */ /* - * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2014 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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; }