Code review of vtkVariant and vtkScalarsToColors
- added range checking to GetAnnotation() for consistency with GetAnnotatedValue() - improved various comments as I learned the details of these classes - changed vtkVariant's Valid ivar to bool, the related methods were already using bool - changed vtkVariant's Type ivar to unsigned int, the related methods were already using unsigned int - use VTK_VOID instead of a raw 0 for vtkVariant's Type - make use of constexpr in a few places - always use .0 so that doubles look like doubles and not ints - prefer preincrement in for loop - instead of guarding possible null pointer deref by checking Valid check the pointer itself.
Showing
- Common/Core/vtkScalarsToColors.cxx 49 additions, 53 deletionsCommon/Core/vtkScalarsToColors.cxx
- Common/Core/vtkScalarsToColors.h 8 additions, 4 deletionsCommon/Core/vtkScalarsToColors.h
- Common/Core/vtkVariant.cxx 39 additions, 28 deletionsCommon/Core/vtkVariant.cxx
- Common/Core/vtkVariant.h 39 additions, 24 deletionsCommon/Core/vtkVariant.h
Loading
Please register or sign in to comment