Import 2017-06-07 23:51:09: master e95cfd6e

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-03-21 18:48:40 master 901b1bbb
Changeset

COMP: Fix -Wnarrowing and -Wunused-variable warnings

/path/to/Slicer/Modules/Loadable/Tables/qSlicerTablesModuleWidget.cxx: In member function ‘void qSlicerTablesModuleWidget::onMRMLTableNodeModified(vtkObject)’:
/path/to/Slicer/Modules/Loadable/Tables/qSlicerTablesModuleWidget.cxx:167:21: warning: unused variable ‘tableNode’ [-Wunused-variable]
vtkMRMLTableNode
tableNode = vtkMRMLTableNode::SafeDownCast(caller);
^

/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx: In member function ‘void vtkMRMLOrientationMarkerDisplayableManager::vtkInternal::UpdateMarkerSize()’:
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx:511:38: warning: narrowing conversion of ‘(maxX - minX)’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
int rendererSizeInPixels[2] = {maxX-minX, maxY-minY};
^
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx:511:49: warning: narrowing conversion of ‘(maxY - minY)’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
int rendererSizeInPixels[2] = {maxX-minX, maxY-minY};
^
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx: In member function ‘void vtkMRMLRulerDisplayableManager::vtkInternal::UpdateRuler()’:
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx:289:42: warning: narrowing conversion of ‘(maxX - minX)’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
int rendererSizeInPixels[2] = {maxX-minX, maxY-minY};
^
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx:289:53: warning: narrowing conversion of ‘(maxY - minY)’ from ‘double’ to ‘int’ inside { } is ill-formed in C++11 [-Wnarrowing]
int rendererSizeInPixels[2] = {maxX-minX, maxY-minY};
^

/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx: In member function ‘void vtkMRMLRulerDisplayableManager::vtkInternal::SetupRuler()’:
/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx:213:13: warning: unused variable ‘numberOfTickLines’ [-Wunused-variable]
const int numberOfTickLines = 11;
^

/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx:281:15: warning: unused variable ‘viewport’ [-Wunused-variable]
double* viewport = this->MarkerRenderer->GetViewport();
^

/path/to/Slicer/Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx:338:79: warning: narrowing conversion of ‘rulerLineMarginPixel’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
double pointOrigin[3] = {double(viewWidthPixel)/2.0, rulerLineMarginPixel, 0};

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24977 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx Diff File
mod - Libs/MRML/DisplayableManager/vtkMRMLRulerDisplayableManager.cxx Diff File
mod - Modules/Loadable/Tables/qSlicerTablesModuleWidget.cxx Diff File