diff options
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 55438465ad..f6b9c5ba94 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -146,18 +146,18 @@ OwnPropertyKeyIterator *StringObject::virtualOwnPropertyKeys(const Object *m, Va return new StringObjectOwnPropertyKeyIterator; } -PropertyAttributes StringObject::virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p) +PropertyAttributes StringObject::virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p) { PropertyAttributes attributes = Object::virtualGetOwnProperty(m, id, p); if (attributes != Attr_Invalid) return attributes; - StringObject *s = static_cast<StringObject *>(m); + const StringObject *s = static_cast<const StringObject *>(m); uint slen = s->d()->string->toQString().length(); uint index = id.asArrayIndex(); if (index < slen) { if (p) - p->value = static_cast<StringObject *>(s)->getIndex(index); + p->value = s->getIndex(index); return Attr_NotConfigurable|Attr_NotWritable; } return Object::virtualGetOwnProperty(m, id, p); |