]> www.ginac.de Git - ginac.git/blobdiff - ginac/wildcard.cpp
Make step(0)=1 for greater consistency.
[ginac.git] / ginac / wildcard.cpp
index 1bcf2ac2fd4268e9e5cf96137be5d4cdeeb871eb..62a4eb5086d552fd1c75a304045c739f4717b4f5 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's wildcard objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2006 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
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 #include <iostream>
@@ -37,7 +37,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(wildcard, basic,
 // default constructor
 //////////
 
-wildcard::wildcard() : inherited(TINFO_wildcard), label(0)
+wildcard::wildcard() : inherited(&wildcard::tinfo_static), label(0)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -46,7 +46,7 @@ wildcard::wildcard() : inherited(TINFO_wildcard), label(0)
 // other constructors
 //////////
 
-wildcard::wildcard(unsigned l) : inherited(TINFO_wildcard), label(l)
+wildcard::wildcard(unsigned l) : inherited(&wildcard::tinfo_static), label(l)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -106,7 +106,7 @@ unsigned wildcard::calchash() const
        // this is where the schoolbook method
        // (golden_ratio_hash(tinfo()) ^ label)
        // is not good enough yet...
-       hashvalue = golden_ratio_hash(golden_ratio_hash(tinfo()) ^ label);
+       hashvalue = golden_ratio_hash(golden_ratio_hash((p_int)tinfo()) ^ label);
        setflag(status_flags::hash_calculated);
        return hashvalue;
 }
@@ -123,7 +123,7 @@ bool haswild(const ex & x)
 {
        if (is_a<wildcard>(x))
                return true;
-       for (int i=0; i<x.nops(); ++i)
+       for (size_t i=0; i<x.nops(); ++i)
                if (haswild(x.op(i)))
                        return true;
        return false;