oops, forgot to reply-all
---------- Forwarded message ---------- From: Norbert Thiebaud <nthieb...@gmail.com> Date: 2010/11/23 Subject: Re: [Libreoffice] [patch] binfilter: cleanup and compilation warnings removal. To: Pierre-André Jacquod <pjacq...@alumni.ethz.ch> 2010/11/23 Pierre-André Jacquod <pjacq...@alumni.ethz.ch>: > On 11/23/2010 09:23 AM, Joachim Trémouroux wrote: > >> Hi Michael, >> I will work on this. I see two possible ways: >> > > Ok Michael, then I will continue within binfilter... ::-)) > > But a additional question: > > From Norbert Thiebaud: >> >> To be consistent, I rather see them commented out >> i.e >> >> foo(int bar) >> -> >> foo(int /*bar*/) >> rather than >> foo(int) > > To have a better code, would it not be better to change the prototyping > of the function from foo (int) to foo() ?? Or did I miss a point? No you usually can't do that. these function are often virtual, so if you change the prototype you need to change it in the whole inheritance. furthermore even if not virtual you would still need to cahnge all the caller. The reasons for all the 'unused' parameter is that binfilter is essentially a gutted version of the old product that is there only to convert old format... In some case the parameter are 'unused' even in 'normal' code, because a virtual function was designed with the idea thaty you 'might' need a give info, but practically in that sub-class you really don't care about it... just because you don;t care for that sub-class doesn't mean that any sub-class won't... and leaving the name in, allow the reader to actually understand what information is available - yet unnecessary for now. So no, you can't practically remove the parameter... and leaving the parameter name, ableit inside /* */, is nicer because then you know what that parameter is ... imagine foo(int,int,int,int) compared to foo(int /* x_pos*/, int /* y_pos */, int /* legnth */, int /* width */) which one would you prefer reading ? (from the point of view: I don't know anything about foo() ) Norbert > > So would the code be cleaner.... or do you intend to drop the binfilter > components very soon ? > regards > > > _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice