[vtk-developers] Naming variables in function definitions

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


In the vtkMath functions you mentioned, it looks to me that the person
that implemented the methods just left out the name. Probably the way
he normally writes code. I think the name should be there which will
help with documentation. Since these functions are just declared and
not implemented in the .h file, there will not be a warning.

On Wed, Dec 9, 2009 at 4:17 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> I wonder if you need to remove the variable in the function
> declaration to avoid warning or just in the function definition. David
> could always try one of these and see if the dashboard produces any
> warnings. Btw, I recommend turning on most of the compiler warnings.
> At least as much as the dashboards turn on.
>
> 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.
>>
>> On Wed, Dec 9, 2009 at 3:32 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>>> Under my "limited write access" contract, is it OK if I name currently
>>> unnamed variables in function declarations? e.g. change
>>>
>>>  static float RadiansFromDegrees( float );
>>>
>>> to
>>>
>>>  static float RadiansFromDegrees( float degrees);
>>>
>>> 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
>>>
>>>
>> _______________________________________________
>> 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