diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-24 17:43:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-24 17:43:38 +0100 |
commit | d05c7c6287f76ed023a32ff592ff2e8db05926dc (patch) | |
tree | 794fac4a7363d19bc2d6be5b16adddf187fedc66 | |
parent | ca2d878659400b783ae72267f47d0c719b50a1ad (diff) |
Less casting
Change-Id: I955d82d8dd7a6092feb1de03c7c6486125f30831
-rw-r--r-- | framework/source/services/desktop.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index d686b755151b..aabf2fd52c91 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1777,13 +1777,12 @@ namespace { struct Instance { explicit Instance( css::uno::Reference<css::uno::XComponentContext> const & context): - instance(static_cast<cppu::OWeakObject *>(new framework::Desktop(context))) + instance(new framework::Desktop(context)) { - static_cast<framework::Desktop *>(static_cast<cppu::OWeakObject *> - (instance.get()))->constructorInit(); + instance->constructorInit(); } - css::uno::Reference<css::uno::XInterface> instance; + rtl::Reference<framework::Desktop> instance; }; struct Singleton: @@ -1798,8 +1797,7 @@ com_sun_star_comp_framework_Desktop_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - return cppu::acquire(static_cast<cppu::OWeakObject *>( - Singleton::get(context).instance.get())); + return cppu::acquire(Singleton::get(context).instance.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |