[vtk-developers] cppcheck help with: vtkPlanes, vtkX3DExporterFIWriter, vtkXdmfHeavyData, vtkGPUVolumeRayCastMapper, vtkLineWidget

Sean McBride sean at rogue-research.com
Wed Dec 2 21:46:46 EST 2015


On Wed, 2 Dec 2015 19:28:33 -0700, David Gobbi said:

>> (a)
>> uselessAssignmentPtrArg,Common/DataModel/vtkPlanes.cxx:
>341,warning,Assignment
>> of function parameter has no effect outside the function. Did you forget
>> dereferencing it?
>>
>> This is likely copy-paste from method above.  Fixing it may require
>> changing the signature of this public API.
>>
>
>No need to change the API, just remove the "else" clause.  Simple fix.

My worry is the public API docs in the .h suggest that the ability to get null for the out-of-range case is important.  The one GetPlane variant can, and it's replacement function can't.  It could be made to return bool, which would be pretty backwards compatible.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtk-developers mailing list