diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-10-22 16:47:04 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-10-23 12:18:24 +0200 |
commit | 36d365458d54c6168c8003f7348e932e3a4ffc2c (patch) | |
tree | 18fbb941678c7c7bd7a58d122df64a4b238f67ce /src/script/bridge/qscriptclassobject_p.h | |
parent | 4d318525c9663a46d36b27605143dab3250d2b9b (diff) | |
download | qt4-tools-36d365458d54c6168c8003f7348e932e3a4ffc2c.tar.gz |
Inline internal QtScript object delegate functions
Makes QScriptValue::scriptClass() 20% faster.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/script/bridge/qscriptclassobject_p.h')
-rw-r--r-- | src/script/bridge/qscriptclassobject_p.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptclassobject_p.h b/src/script/bridge/qscriptclassobject_p.h index f5cce76a27..9b342449ad 100644 --- a/src/script/bridge/qscriptclassobject_p.h +++ b/src/script/bridge/qscriptclassobject_p.h @@ -70,8 +70,8 @@ public: ClassObjectDelegate(QScriptClass *scriptClass); ~ClassObjectDelegate(); - QScriptClass *scriptClass() const; - void setScriptClass(QScriptClass *scriptClass); + inline QScriptClass *scriptClass() const; + inline void setScriptClass(QScriptClass *scriptClass); virtual Type type() const; @@ -105,6 +105,17 @@ private: QScriptClass *m_scriptClass; }; +inline QScriptClass *ClassObjectDelegate::scriptClass() const +{ + return m_scriptClass; +} + +inline void ClassObjectDelegate::setScriptClass(QScriptClass *scriptClass) +{ + Q_ASSERT(scriptClass != 0); + m_scriptClass = scriptClass; +} + } // namespace QScript QT_END_NAMESPACE |