diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-07-27 13:12:56 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-07-27 22:20:56 +0200 |
| commit | 054694ee5bd70384d30d0b7b9bf785a1df37b16b (patch) | |
| tree | 767c322cd0c87570baca11aee214fb8dec3213f0 /src/qml/jsruntime/qv4internalclass.cpp | |
| parent | e14b7fe59767e972a32aed7b019d01def14b429c (diff) | |
| download | qtdeclarative-054694ee5bd70384d30d0b7b9bf785a1df37b16b.tar.gz | |
Remove QV4:PropertyHash::removeIdentifier()
You cannot actually remove anything from these hashes.
Change-Id: I4b08639f56e3198f48dac1fabfd324cca87c3fdc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4internalclass.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp index 134aaa8433..cc839d5239 100644 --- a/src/qml/jsruntime/qv4internalclass.cpp +++ b/src/qml/jsruntime/qv4internalclass.cpp @@ -42,34 +42,6 @@ void PropertyHash::addEntry(const PropertyHash::Entry &entry, int classSize) ++d->size; } -int PropertyHash::removeIdentifier(PropertyKey identifier, int classSize) -{ - int val = -1; - PropertyHashData *dd = new PropertyHashData(d->numBits); - for (int i = 0; i < d->alloc; ++i) { - const Entry &e = d->entries[i]; - if (!e.identifier.isValid() || e.index >= static_cast<unsigned>(classSize)) - continue; - if (e.identifier == identifier) { - val = e.index; - continue; - } - uint idx = e.identifier.id() % dd->alloc; - while (dd->entries[idx].identifier.isValid()) { - ++idx; - idx %= dd->alloc; - } - dd->entries[idx] = e; - } - dd->size = classSize; - if (!--d->refCount) - delete d; - d = dd; - - Q_ASSERT(val != -1); - return val; -} - void PropertyHash::detach(bool grow, int classSize) { if (d->refCount == 1 && !grow) |
