diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-02-10 12:31:40 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-02-10 12:31:40 (GMT) |
commit | 95fd5f1c991ee66f7122801276a133ebfce86aaa (patch) | |
tree | b6882cdef0c60182168c8c11e298dcd76cc02bbc /src/sortdict.h | |
parent | 38c6a14b15d87348076be142abea8663009ace82 (diff) | |
download | Doxygen-95fd5f1c991ee66f7122801276a133ebfce86aaa.zip Doxygen-95fd5f1c991ee66f7122801276a133ebfce86aaa.tar.gz Doxygen-95fd5f1c991ee66f7122801276a133ebfce86aaa.tar.bz2 |
Release-1.5.5
Diffstat (limited to 'src/sortdict.h')
-rw-r--r-- | src/sortdict.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sortdict.h b/src/sortdict.h index b9f6f7c..bc0488d 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -168,6 +168,18 @@ class SDict return item ? m_list->remove(item) : FALSE; } + /*! Take an item out of the dictionary without deleting it */ + T *take(const char *key) + { + T *item = m_dict->take(key); + if (item) + { + int i = m_list->find(item); + m_list->take(i); + } + return item; + } + /*! Sorts the members of the dictionary. First appending a number * of members and then sorting them is faster (O(NlogN) than using * inSort() for each member (O(N^2)). |