1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/math/coinmp/files/patch-Clp_src_ClpModel.cpp
Jan Beich d45773d7cc math/coinmp: unbreak build with Clang 6 (C++14 by default)
ClpModel.cpp:3848:24: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
                       reinterpret_cast<const char*> (NULL) /*integrality*/,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OsiClpSolverInterface.cpp:1451:50: error: reinterpret_cast from 'nullptr_t' to 'int *' is not allowed
    messagesPointer->setDetailMessages(100,10000,reinterpret_cast<int *> (NULL));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from CglLandPSimplex.cpp:11:
In file included from ./CglLandPSimplex.hpp:31:
./CglLandPUtils.hpp:88:25: error: reinterpret_cast from 'nullptr_t' to 'OsiRowCut *' is not allowed
        cuts_.resize(i, reinterpret_cast<OsiRowCut *> (NULL));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CbcModel.cpp:5322:41: error: reinterpret_cast from 'nullptr_t' to 'double *' is not allowed
            clpSolver->setFakeObjective(reinterpret_cast<double *> (NULL));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported by:	antoine (via bug 224669)
2018-01-05 12:37:45 +00:00

16 lines
842 B
C++

ClpModel.cpp:3848:24: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
reinterpret_cast<const char*> (NULL) /*integrality*/,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- Clp/src/ClpModel.cpp.orig 2015-03-19 08:09:18 UTC
+++ Clp/src/ClpModel.cpp
@@ -3845,7 +3845,7 @@ ClpModel::writeMps(const char *filename,
writer.setMpsData(*(matrix_->getPackedMatrix()), COIN_DBL_MAX,
getColLower(), getColUpper(),
objective,
- reinterpret_cast<const char*> (NULL) /*integrality*/,
+ static_cast<const char*> (NULL) /*integrality*/,
getRowLower(), getRowUpper(),
columnNames, rowNames);
// Pass in array saying if each variable integer