Build fails: error: type 'double' cannot be narrowed to 'int' in initializer list
Brought to you by:
garyhuizhang,
pyushkevich
On FreeBSD 11.2 with clang-60:
/usr/ports/graphics/itk-snap/work/itksnap-3.6.0/GUI/Renderer/SliceWindowDecorationRenderer.cxx:83:56: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing] { AbstractRendererPlatformSupport::TYPEWRITER, elt->GetFontSize() * vppr, true }; ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/ports/graphics/itk-snap/work/itksnap-3.6.0/GUI/Renderer/SliceWindowDecorationRenderer.cxx:83:56: note: insert an explicit cast to silence this issue { AbstractRendererPlatformSupport::TYPEWRITER, elt->GetFontSize() * vppr, true }; ^~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /usr/ports/graphics/itk-snap/work/itksnap-3.6.0/GUI/Renderer/SliceWindowDecorationRenderer.cxx:186:50: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing] { AbstractRendererPlatformSupport::SANS, elt->GetFontSize() * vppr, false }; ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/ports/graphics/itk-snap/work/itksnap-3.6.0/GUI/Renderer/SliceWindowDecorationRenderer.cxx:186:50: note: insert an explicit cast to silence this issue { AbstractRendererPlatformSupport::SANS, elt->GetFontSize() * vppr, false }; ^~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<int>( ) /usr/ports/graphics/itk-snap/work/itksnap-3.6.0/GUI/Renderer/SliceWindowDecorationRenderer.cxx:328:50: error: type 'float' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing] { AbstractRendererPlatformSupport::SANS, font_size * vppr, false }; ^~~~~~~~~~~~~~~~
Also: