[REVIEWED] Remove unused code

2012-02-23 Thread Michael Meeks

On Wed, 2012-02-22 at 22:06 +0100, Santiago Martinez wrote:
 This patch removes unused code as listed in unusedcode.easy

That is most odd; I wouldn't expect unusedcode.easy to list virtual
methods, particularly ones (possibly?) required to implement XComponent:

 // XComponent
-virtual  void SAL_CALL dispose() throw
(::com::sun::star::uno::RuntimeException) = 0;

Then again - declaring the method abstract, and then implementing it
does seem like an odd choice ;-) unclear what the intention is here.

Any thoughts Caolan ?

HTH,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED][REVIEWED] Remove unused code

2012-02-23 Thread Caolán McNamara
On Thu, 2012-02-23 at 13:03 +, Michael Meeks wrote:
   Any thoughts Caolan ?

callcatcher is right, this is a *pure* virtual, i.e. the = 0 of

virtual void dispose() = 0;

Everything that inherits from it has to implement a ::dispose so there's
a virtual method slot created for dispose and everything that inherits
from it has to implement a ::dispose which'll be a virtual method.

Typically you don't provide an implementation of a pure virtual, because
you're forcing the inheritors to provide one, but if you *do* then that
implementation itself isn't actually a virtual, and if you want to call
it you have to explicitly call it.  

So, in this case, no one has explicitly called the baseclass pure
virtual implementation, so the bodies can go, but to be safe the pure
virtual declarations themselves should stay, i.e.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=84cc2688f429ef915810a3799f46ae98293096a6

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice