Open svigerske opened 5 years ago
Comment by @tkralphs created at 2018-01-07 20:39:37
Casting to "int" first fixes the error:
https://stackoverflow.com/questions/17083596/double-to-enum-cast-warns-types-mixed
although it seems like kind of an ugly hack.
Issue created by migration from Trac.
Original creator: @tkralphs
Original creation time: 2018-01-07 20:24:23
Version:
You are doing some implicit type conversions that aren't allowed in Visual Studio.
../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(3944): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_TYPE' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(3944): note: Conversions between enumeration and floating point values are no longer allowed ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(3946): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_SYMMETRY' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(3946): note: Conversions between enumeration and floating point values are no longer allowed ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4044): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_TYPE' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4044): note: Conversions between enumeration and floating point values are no longer allowed ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4046): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_SYMMETRY' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4046): note: Conversions between enumeration and floating point values are no longer allowed ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4144): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_TYPE' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4144): note: Conversions between enumeration and floating point values are no longer allowed ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4146): error C2440: 'type cast': cannot convert from 'double' to 'ENUM_MATRIX_SYMMETRY' ../../../../OS/src/OSCommonInterfaces/OSMatrix.cpp(4146): note: Conversions between enumeration and floating point values are no longer allowed