summaryrefslogtreecommitdiff
path: root/chart2/source/inc/EventListenerHelper.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/inc/EventListenerHelper.hxx')
-rw-r--r--chart2/source/inc/EventListenerHelper.hxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/chart2/source/inc/EventListenerHelper.hxx b/chart2/source/inc/EventListenerHelper.hxx
index c40fdc49c1e2..dcf3256d46b5 100644
--- a/chart2/source/inc/EventListenerHelper.hxx
+++ b/chart2/source/inc/EventListenerHelper.hxx
@@ -16,12 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_CHART2_SOURCE_INC_EVENTLISTENERHELPER_HXX
-#define INCLUDED_CHART2_SOURCE_INC_EVENTLISTENERHELPER_HXX
+#pragma once
#include <com/sun/star/lang/XComponent.hpp>
-#include <algorithm>
+#include <utility>
namespace com::sun::star::lang { class XEventListener; }
@@ -36,8 +35,8 @@ namespace impl
template< class InterfaceRef >
struct addListenerFunctor
{
- explicit addListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit addListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -54,8 +53,8 @@ private:
template< class InterfaceRef >
struct removeListenerFunctor
{
- explicit removeListenerFunctor( const css::uno::Reference< css::lang::XEventListener > & xListener ) :
- m_xListener( xListener )
+ explicit removeListenerFunctor( css::uno::Reference< css::lang::XEventListener > xListener ) :
+ m_xListener(std::move( xListener ))
{}
void operator() ( const InterfaceRef & xObject )
@@ -118,7 +117,4 @@ void removeListenerFromAllElements(
} // namespace EventListenerHelper
} // namespace chart
-// INCLUDED_CHART2_SOURCE_INC_EVENTLISTENERHELPER_HXX
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */