From 773ba28bfb3ce86dd2f9704d39d60b00d5f30b77 Mon Sep 17 00:00:00 2001 From: Tobias Lippert Date: Thu, 15 Aug 2013 22:27:46 +0200 Subject: Bug # 51154: cppunit warning cleaning This patch allows to compile the code with gcc's -Weffc++ It consists mostly of making copy constructors and assignment operators explicit and private, and of initializing all members in initializer lists. Change-Id: I6f1cae812c58e3791c2386a1288501cf2f559610 Reviewed-on: https://gerrit.libreoffice.org/5424 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- src/cppunit/ProtectorChain.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cppunit/ProtectorChain.cpp') diff --git a/src/cppunit/ProtectorChain.cpp b/src/cppunit/ProtectorChain.cpp index f528341..db7744a 100644 --- a/src/cppunit/ProtectorChain.cpp +++ b/src/cppunit/ProtectorChain.cpp @@ -21,11 +21,20 @@ public: } private: + // disable copying + ProtectFunctor( const ProtectFunctor& ); + // disable copying + ProtectFunctor& operator=( const ProtectFunctor& ); + Protector *m_protector; const Functor &m_functor; const ProtectorContext &m_context; }; +ProtectorChain::ProtectorChain() + : m_protectors(0) +{ +} ProtectorChain::~ProtectorChain() { -- cgit v1.2.1