Please sign in to comment.
COMP: Fix all valid cppcheck warnings in ITK (last patch)
Previously five patches were sent about fixing cppcheck warnings in ITK/Module directory. At the current patch, all other valid remained cppcheck warnings in the ITK directory are fixed. All the remained valid warnings were from Example/ directory. One example of invalid warnings are those that are about unused functions. This functions are not used in static analysis, but the are used by users in real applications. The fixed issues are generally about the following topics: 1) In definition of class A: the 'A::operator=' should return 'A &'. However, they would return viod. 2) Prefix ++/-- operators are preferred for non-primitive types. 3) Initialization to assignment is preferred. 4) If possible, variables are passed by reference.(This warning mostly happens about Exception catching). 5) Emptiness of variables are checked efficiently using the empty() function. 6) Unused variables are removed. All the ITK tests are passed after the above changes. Change-Id: I00e4804b4e26dbc2e709d17a82279713be36f307
- Loading branch information...
Showing with 29 additions and 25 deletions.
- +7 −5 Examples/DataRepresentation/Image/ImageAdaptor3.cxx
- +9 −5 Examples/DataRepresentation/Image/ImageAdaptor4.cxx
- +1 −1 Examples/Filtering/CompositeFilterExample.cxx
- +1 −1 Examples/Filtering/DanielssonDistanceMapImageFilter.cxx
- +0 −2 Examples/Filtering/OtsuMultipleThresholdImageFilter.cxx
- +3 −3 Examples/Filtering/SignedDanielssonDistanceMapImageFilter.cxx
- +1 −1 Examples/Registration/DeformableRegistration10.cxx
- +1 −1 Examples/Registration/DeformableRegistration9.cxx
- +3 −3 Examples/Registration/MultiResImageRegistration1.cxx
- +1 −1 Examples/SpatialObjects/DTITubeSpatialObject.cxx
- +1 −1 Wrapping/Generators/Python/PyUtils/itkPyCommand.h
- +1 −1 Wrapping/Generators/Tcl/itkTclCommand.h