diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-27 12:52:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-27 12:48:50 +0000 |
commit | e25669fcedcb7231254d3ba0e0224b2e3eb901d8 (patch) | |
tree | 05ce242744c88d9efcd5b685720b2178008c2c8c /forms | |
parent | 96d03636a5f932151c7842ae34631258891fe807 (diff) |
don't allocate uno::Reference on the heap
There is no point, since it's the size of a pointer anyway
(found by temporarily making the new operator in uno::Reference
deleted).
Change-Id: I62a8b957fef9184f65d705600acfdab4116dcb34
Reviewed-on: https://gerrit.libreoffice.org/19603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/imgprod.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/imgprod.hxx | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index b2b47b056b03..e2976519f8bc 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -204,7 +204,7 @@ void ImageProducer::addConsumer( const css::uno::Reference< css::awt::XImageCons { DBG_ASSERT( rxConsumer.is(), "::AddConsumer(...): No consumer referenced!" ); if( rxConsumer.is() ) - maConsList.push_back( new css::uno::Reference< css::awt::XImageConsumer > ( rxConsumer )); + maConsList.push_back( rxConsumer ); } diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx index 23a60bcf310d..5bda64f12cfa 100644 --- a/forms/source/component/imgprod.hxx +++ b/forms/source/component/imgprod.hxx @@ -20,15 +20,13 @@ #ifndef INCLUDED_FORMS_SOURCE_COMPONENT_IMGPROD_HXX #define INCLUDED_FORMS_SOURCE_COMPONENT_IMGPROD_HXX -#include <boost/ptr_container/ptr_vector.hpp> - #include <tools/link.hxx> #include <com/sun/star/awt/ImageStatus.hpp> #include <com/sun/star/awt/XImageConsumer.hpp> #include <com/sun/star/awt/XImageProducer.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <cppuhelper/weak.hxx> - +#include <vector> // - ImageProducer - @@ -50,7 +48,7 @@ class ImageProducer : public css::awt::XImageProducer, { private: - typedef boost::ptr_vector< css::uno::Reference< css::awt::XImageConsumer > > ConsumerList_t; + typedef std::vector< css::uno::Reference< css::awt::XImageConsumer > > ConsumerList_t; OUString maURL; ConsumerList_t maConsList; |