Solved some issues and prepared the library for using unordered_map instead of hash_map (C++ TR1). Can only use this when g++-4.0.3 is out

This commit is contained in:
maartenkeijzer 2005-10-15 21:27:47 +00:00
commit bac6644915
11 changed files with 149 additions and 33 deletions

View file

@ -21,7 +21,7 @@ namespace detail {
class SymArgsImpl {
public:
vector<Sym> owned_args;
std::vector<Sym> owned_args;
};
size_t SymArgs::len() const {
@ -76,7 +76,7 @@ int SymKey::calc_hash() const {
unsigned long hash = unsigned(token);
hash *= PRIMET;
const SymVec& v = args.vec();
const std::vector<Sym>& v = args.vec();
for (unsigned i = 0; i < v.size(); ++i) {
hash += ( (v[i].address() >> 3) * primes[i%nprimes]) % HASHMOD;
}