src/corelib/tools/qcache.h
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    68         if (n.p) n.p->n = n.n;
    68         if (n.p) n.p->n = n.n;
    69         if (n.n) n.n->p = n.p;
    69         if (n.n) n.n->p = n.p;
    70         if (l == &n) l = n.p;
    70         if (l == &n) l = n.p;
    71         if (f == &n) f = n.n;
    71         if (f == &n) f = n.n;
    72         total -= n.c;
    72         total -= n.c;
    73         delete n.t;
    73         T *obj = n.t;
    74         hash.remove(*n.keyPtr);
    74         hash.remove(*n.keyPtr);
       
    75         delete obj;
    75     }
    76     }
    76     inline T *relink(const Key &key) {
    77     inline T *relink(const Key &key) {
    77         typename QHash<Key, Node>::iterator i = hash.find(key);
    78         typename QHash<Key, Node>::iterator i = hash.find(key);
    78         if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
    79         if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
    79             return 0;
    80             return 0;