summaryrefslogtreecommitdiff
path: root/binaryurp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-18 12:14:29 +0200
committerNoel Grandin <noel@peralex.com>2014-06-24 11:34:21 +0200
commite2080e70fe8b085f18e868e46340454720fa94ca (patch)
tree4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /binaryurp
parentf910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff)
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/source/binaryany.hxx2
-rw-r--r--binaryurp/source/bridge.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 38197f12b7bf..717216ae5473 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -47,7 +47,7 @@ public:
BinaryAny & operator =(BinaryAny const & other) throw ();
- uno_Any * get() throw () { return &data_; }
+ uno_Any& get() throw () { return data_; }
com::sun::star::uno::TypeDescription getType() const throw ();
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index dc0f3476bb9a..9191d2349e50 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -352,7 +352,7 @@ BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & cppAny) {
BinaryAny out;
out.~BinaryAny();
uno_copyAndConvertData(
- out.get(), &in,
+ &out.get(), &in,
css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(),
cppToBinaryMapping_.get());
return out;
@@ -992,7 +992,7 @@ css::uno::Any Bridge::mapBinaryToCppAny(BinaryAny const & binaryAny) {
css::uno::Any out;
out.~Any();
uno_copyAndConvertData(
- &out, in.get(),
+ &out, &in.get(),
css::uno::TypeDescription(cppu::UnoType< css::uno::Any >::get()).get(),
binaryToCppMapping_.get());
return out;