coin-or / OS

Optimization Services
Other
1 stars 4 forks source link

OSMatrix.cpp: Conversions between enumeration and floating point values are no longer allowed #65

Open svigerske opened 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: devos

Original creation time: 2018-01-08 22:16:50

Keywords: OS 2.10, trunk, cl, matrix, enumeration

When building COIN-OS using MS VS 2008 cl compiler, the following error occurs during make: OSMatrix.cpp: cannot convert from 'double' to 'ENUM_MATRIX_TYPE'. Conversions between enumeration and floating point values are no longer allowed.

I resolved the error by editing OS/src/OSCommonInterfaces/OSMatrix.cpp. The fix is to cast the double value to int before casting to ENUM_MATRIX_TYPE/ENUM_MATRIX_SYMMETRY on lines 3944, 3946, 4044, 4046, 4144, and 4146. See attached Fix for COIN-OS OSCommonInterfaces in Trunk 5287.docx.

svigerske commented 5 years ago

Attachment [Fix for COIN-OS OSCommonInterfaces in Trunk 5287.docx](https://www.coin-or.org/issue-attachments/OS/ticket65/Fix for COIN-OS OSCommonInterfaces in Trunk 5287.docx) by devos created at 2018-01-08 22:17:09