Skip to content

COMP: Fix narrowing warnings in qSlicerSimpleMarkupsWidget

Created by: jcfr

This commit addresses the following warnings:

/home/jcfr/Projects/Slicer/Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx:240:42: warning: narrowing conversion of ‘color.QColor::red()’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
   double rgbDoubleVector[3] = {color.red(),color.green(),color.blue()};
                                          ^
/home/jcfr/Projects/Slicer/Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx:240:56: warning: narrowing conversion of ‘color.QColor::green()’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
   double rgbDoubleVector[3] = {color.red(),color.green(),color.blue()};
                                                        ^
/home/jcfr/Projects/Slicer/Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx:240:69: warning: narrowing conversion of ‘color.QColor::blue()’ from ‘int’ to ‘double’ inside { } is ill-formed in C++11 [-Wnarrowing]
   double rgbDoubleVector[3] = {color.red(),color.green(),color.blue()};

Merge request reports

Loading