Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS fails to build with MSVC 14 #63

Open
svigerske opened this issue Mar 5, 2019 · 1 comment
Open

OS fails to build with MSVC 14 #63

svigerske opened this issue Mar 5, 2019 · 1 comment

Comments

@svigerske
Copy link
Member

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

@svigerske
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant