X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fhash_map.h;h=c41fce290e7060025fcbe0a82d32f7225f048c6f;hp=13facc415c403e892121a14de38a2dc8ec1f9617;hb=71e1de972fd7f37d560427bffbb0f36215788d31;hpb=7dfed2bf4fb42d23410332576dc9fbe14ea154f8 diff --git a/ginac/hash_map.h b/ginac/hash_map.h index 13facc41..c41fce29 100644 --- a/ginac/hash_map.h +++ b/ginac/hash_map.h @@ -3,7 +3,7 @@ * Replacement for map<> using hash tables. */ /* - * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2009 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,19 +17,18 @@ * * 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 */ -#ifndef __GINAC_HASH_MAP_H__ -#define __GINAC_HASH_MAP_H__ +#ifndef GINAC_HASH_MAP_H +#define GINAC_HASH_MAP_H -#include -#include #include #include +#include +#include #include - namespace GiNaC { /* @@ -337,7 +336,7 @@ public: iterator insert(iterator pos, const value_type &x) { - return insert(this->val).first; + return insert(x).first; } template @@ -431,6 +430,7 @@ public: return !(lhs == rhs); } +#if 0 void dump() const { std::clog << "num_entries = " << num_entries << std::endl; @@ -441,6 +441,7 @@ public: std::clog << (it->first == EMPTY ? "free" : (it->first == USED ? "used" : "erased")) << ", " << it->second.first << " -> " << it->second.second << std::endl; } } +#endif }; /** Return pointer to bucket corresponding to key (or first empty bucket). */ @@ -592,4 +593,4 @@ inline void swap(GiNaC::exhashmap &lhs, GiNaC::exhashmap &rhs) } // namespace std -#endif // ndef __GINAC_HASH_MAP_H__ +#endif // ndef GINAC_HASH_MAP_H