diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-30 21:10:59 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-30 23:57:16 +0100 |
commit | 9f236a078cd179835b8c651990e3afecee6170ca (patch) | |
tree | 94e98bafa6225d8e6d04d58da87edeb8961550fd /static/source/embindmaker/embindmaker.cxx | |
parent | 9a982f8cb62da5a82ae1426aa40900dd360c93b5 (diff) |
Pass the_self by const ref in Embind wrapper functions
Change-Id: Ie8bfec2a9fdd5f126fd2879d2ba06f1fa5c1019e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162781
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'static/source/embindmaker/embindmaker.cxx')
-rw-r--r-- | static/source/embindmaker/embindmaker.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index c7aba58c3089..262e202313a8 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -473,8 +473,9 @@ void dumpWrapper(std::ostream& out, rtl::Reference<TypeManager> const& manager, OUString const& interfaceName, unoidl::InterfaceTypeEntity::Method const& method, std::list<OUString> const& baseTrail) { - out << " .function(\"" << method.name << "\", +[](" << cppName(interfaceName); - out << " * the_self"; + out << " .function(\"" << method.name << "\", +[](::com::sun::star::uno::Reference<" + << cppName(interfaceName); + out << "> const & the_self"; if (!method.parameters.empty()) { out << ", "; @@ -486,6 +487,10 @@ void dumpWrapper(std::ostream& out, rtl::Reference<TypeManager> const& manager, out << "static_cast<" << cppName(base) << " *>("; } out << "the_self"; + if (!baseTrail.empty()) + { + out << ".get()"; + } for (std::size_t i = 0; i != baseTrail.size(); ++i) { out << ")"; |