X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fidx.cpp;h=cefcfb1d840a5b1434f2d7580b5d6dab70f8de65;hp=c2565cada43947822d37de3a396e213948273e8d;hb=87ed87c395d6121fe468efc68ee2cd33a7e91200;hpb=1602530f716ba1d425a0667b897182b99c374823 diff --git a/ginac/idx.cpp b/ginac/idx.cpp index c2565cad..cefcfb1d 100644 --- a/ginac/idx.cpp +++ b/ginac/idx.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's indices. */ /* - * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2010 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 @@ -27,6 +27,7 @@ #include "operators.h" #include "archive.h" #include "utils.h" +#include "hash_seed.h" #include #include @@ -350,8 +351,7 @@ unsigned idx::calchash() const // hash keys. That is, the hash values must not depend on the index // dimensions or other attributes (variance etc.). // The compare_same_type() methods will take care of the rest. - const void* this_tinfo = (const void*)(typeid(*this).name()); - unsigned v = golden_ratio_hash((p_int)this_tinfo); + unsigned v = make_hash_seed(typeid(*this)); v = rotate_left(v); v ^= value.gethash();