]> www.ginac.de Git - ginac.git/blobdiff - ginac/symmetry.cpp
calchash(): work around broken RTTI.
[ginac.git] / ginac / symmetry.cpp
index 1de84e644dd9d95737c3a0812dd544225f9f9d7b..9e00a8c843633fdfece0c0ab9715343a9ddd7e02 100644 (file)
@@ -26,6 +26,7 @@
 #include "operators.h"
 #include "archive.h"
 #include "utils.h"
+#include "hash_seed.h"
 
 #include <functional>
 #include <iostream>
@@ -185,8 +186,7 @@ int symmetry::compare_same_type(const basic & other) const
 
 unsigned symmetry::calchash() const
 {
-       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));
 
        if (type == none) {
                v = rotate_left(v);