* Implementation of GiNaC's wildcard objects. */
/*
- * GiNaC Copyright (C) 1999-2005 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
*
* 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>
// default constructor
//////////
-wildcard::wildcard() : inherited(TINFO_wildcard), label(0)
+wildcard::wildcard() : inherited(&wildcard::tinfo_static), label(0)
{
setflag(status_flags::evaluated | status_flags::expanded);
}
// 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);
}
// 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;
}
{
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;