diff options
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 4ff0565f9b..6d25abba9a 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -708,6 +708,20 @@ inline unsigned int Value::toUInt32() const return (unsigned int)toInt32(); } +struct ValueArray { + uint size; + uint alloc; + Value v[1]; + + inline Value &operator[] (uint index) { + Q_ASSERT(index < alloc); + return v[index]; + } + inline const Value &operator[] (uint index) const { + Q_ASSERT(index < alloc); + return v[index]; + } +}; } |