[vtk-developers] Naming variables in function definitions

Bill Lorensen bill.lorensen at gmail.com
Wed Dec 9 16:16:58 EST 2009


Sometimes in virtual methods, a variable is not used in the particular
subclass. In that case, the name should not be listed.


On Wed, Dec 9, 2009 at 4:11 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Wed, Dec 9, 2009 at 4:08 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Depending on the situation, this may cause warnings by some compilers.
>> This will occur if the body of the method is present and the variable
>> is not used.
>>
>> Also, remember if you change anything other than a comment, always
>> recompile, run the tests and check the dashboard for at least a day
>> for errors, failing tests or warnings.
>
> Bill,
>
> Why would the body of the method not be present? Assuming it is
> present, why would the variable not be used? Isn't that a good thing
> if it generates an "unused variable" warning so we could remove the
> unused variable? Maybe I have missed your point?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list