aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-05-18 23:24:47 +0200
committerRobert Loehning <robert.loehning@qt.io>2020-05-19 20:57:18 +0200
commit0309f028a419b45ff86e31a0604bd3a469bd8f2d (patch)
tree0e863a6dc52cf16ae6d5b536e801bbc7b546a42e /src/qml/jsruntime/qv4internalclass_p.h
parent9c2f0b34afd247beb353d770965c39a9546ce228 (diff)
Remove dead code
Change-Id: I89cc47d20f07095b966b3d9758beafb99359aa2e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 403702ae55..b2fe0c8aa9 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -239,8 +239,7 @@ struct SharedInternalClassData {
Q_ASSERT(d->refcount > 1);
// need to detach
Private *dd = new Private(*d, pos, value);
- if (!--d->refcount)
- delete d;
+ --d->refcount;
d = dd;
return;
}
@@ -260,8 +259,7 @@ struct SharedInternalClassData {
if (d->refcount > 1) {
// need to detach
Private *dd = new Private(*d);
- if (!--d->refcount)
- delete d;
+ --d->refcount;
d = dd;
}
d->set(pos, value);