]> www.ginac.de Git - ginac.git/blobdiff - ginac/symmetry.cpp
calchash(): use type_info::name() instead of tinfo().
[ginac.git] / ginac / symmetry.cpp
index 6ab0944dd79882d7dd4284a800f4fdf45a9fb06c..9a1589267a09e467ccf313c0aa85b7d2e42a8bd8 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symmetry definitions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 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
@@ -185,7 +185,8 @@ int symmetry::compare_same_type(const basic & other) const
 
 unsigned symmetry::calchash() const
 {
-       unsigned v = golden_ratio_hash((p_int)tinfo());
+       const void* this_tinfo = (const void*)typeid(*this).name();
+       unsigned v = golden_ratio_hash((p_int)this_tinfo);
 
        if (type == none) {
                v = rotate_left(v);