diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-30 16:18:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-30 17:08:57 +0300 |
commit | 74c7707e8c763a60c2936e95c2f0ad13dfd33f43 (patch) | |
tree | 08dddce249a8821e54728355f32fea976d324ac1 /source | |
parent | 0e4e1993e619caad3dfbecc20ab9fb20cdf6cd06 (diff) |
Cycles: Pass Blender's C++ RNA structures by reference
This way we avoid passing structures which could be up to
few hundred bytes by value to the utility functions.
Ideally we'll also have to add `const` qualifier in majority
of the calls, but C++ RNA does not allow us to do that because
it does not know if some function modifies contents or not.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index ce977daf30a..535847cfc78 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3692,6 +3692,7 @@ static const char *cpp_classes = "" "return *this; }\n" "\n" " operator T*() { return data; }\n" +" operator const T*() const { return data; }\n" "};\n" "\n" "template<typename T>\n" |