void operator delete[](void* p) { Allocator::deleteArray(p); }
void* operator new(size_t, NotNullTag, void* location)
{
- ASSERT(!Allocator::isGarbageCollected);
+ COMPILE_ASSERT(!Allocator::isGarbageCollected, Garbage_collector_must_be_disabled);
ASSERT(location);
return location;
}
typedef typename HashTableType::AddResult AddResult;
public:
- void swap(HashMap& other)
+ void swap(HashMap& ref)
{
- m_impl.swap(other.m_impl);
+ m_impl.swap(ref.m_impl);
+ }
+
+ void swap(typename Allocator::template OtherType<HashMap>::Type other)
+ {
+ HashMap& ref = Allocator::getOther(other);
+ m_impl.swap(ref.m_impl);
}
unsigned size() const;
AddResult result = inlineAdd(key, mapped);
if (!result.isNewEntry) {
// The inlineAdd call above found an existing hash table entry; we need to set the mapped value.
- MappedTraits::store(mapped, result.iterator->value);
+ MappedTraits::store(mapped, result.storedValue->value);
}
return result;
}