Removed unused methods

Jan Holesovsky kendy at suse.cz
Fri Apr 27 06:49:20 PDT 2012


Hi Stephan,

Stephan Bergmann píše v Pá 27. 04. 2012 v 15:13 +0200:

> >> I have added a comment so it doesn't happen again:
> >>
> >> http://cgit.freedesktop.org/libreoffice/core/commit/?id=34fe1bed19e4cf66500d7e7817eb251c42f8f439
> >
> > #ifdef WNT / #endif would be better
> 
> Would it really be better?  With our huge configuration matrix, I guess 
> there will always be functions left unused for some specific 
> configurations.  #ifdef'ing up the code to avoid that in general would 
> IMO not make the code better, but worse (by cluttering it with #ifdefs).
> 
> If a class has some generally-useful--looking member functions that 
> happen to only be used with certain configurations, I see nothing bad 
> with leaving them in unconditionally.  (Note, I have no idea whether the 
> given FontSelectPattern ctor qualifies.)

While I generally agree with you, it happens soooo often that something
needed on Windows is removed during the unusedcode.easy cleanup pushing,
that I'd really prefer the #ifdef for the Windows case - so that it
disappears from the unusedcode.easy.  Comments like "// NOTE: this is
important because XY" tend to bitrot over time [just recently I removed
a comment that was referring to something that was gone long ago].

But whatever - I don't think it is necessary to bikeshed over this :-)

All the best,
Kendy



More information about the LibreOffice mailing list