Ignore:
Timestamp:
Jan 31, 2006, 8:33:27 PM (19 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • added deleteAllValues for HashSet as well as HashMap
  • fixed conversion from const_iterator to iterator, which I broke a while back
  • kxmlcore/HashMap.h: Updated copyright date.
  • kxmlcore/HashSet.h: (KXMLCore::deleteAllValues): Added.
  • kxmlcore/HashTable.h: (KXMLCore::HashTableIterator::operator const_iterator): Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kxmlcore/HashSet.h

    r12329 r12511  
    22/*
    33 * This file is part of the KDE libraries
    4  * Copyright (C) 2005 Apple Computer, Inc.
     4 *
     5 * Copyright (C) 2005, 2006 Apple Computer, Inc.
    56 *
    67 * This library is free software; you can redistribute it and/or
     
    194195    }
    195196
     197    template<typename Value, typename HashFunctions, typename Traits>
     198    void deleteAllValues(HashSet<Value, HashFunctions, Traits>& collection)
     199    {
     200        typedef HashSet<Value, HashFunctions, Traits> T;
     201        typename T::iterator end = collection.end();
     202        for (typename T::iterator it = collection.begin(); it != end; ++it)
     203            delete (*it);
     204    }
     205
    196206} // namespace khtml
    197207
Note: See TracChangeset for help on using the changeset viewer.