summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/parameter_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-09-05 20:14:05 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-06 18:10:48 +0000
commit414122d2b02862b6f1815fb71083c0a1913d5a44 (patch)
treef866505ac51c81b7174416a623e246b293d30447 /src/render/materialsystem/parameter_p.h
parentec95ed168ace9358596d995c984ba969cb9975ca (diff)
Return the Uniform as a const reference to avoid expensive copies
And inline the nameId() and uniform() getters. Change-Id: I4c30a6fa36a6e5a7e621d3fad91d88adfcfda185 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/materialsystem/parameter_p.h')
-rw-r--r--src/render/materialsystem/parameter_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/materialsystem/parameter_p.h b/src/render/materialsystem/parameter_p.h
index 6830ef07d..21c88b56e 100644
--- a/src/render/materialsystem/parameter_p.h
+++ b/src/render/materialsystem/parameter_p.h
@@ -74,8 +74,8 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
QString name() const;
- int nameId() const Q_DECL_NOTHROW;
- UniformValue uniformValue() const;
+ int nameId() const Q_DECL_NOTHROW { return m_nameId; }
+ const UniformValue &uniformValue() const { return m_uniformValue; }
private:
void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) Q_DECL_FINAL;