about summary refs log tree commit diff
path: root/pkgs/by-name/co/coinmp/0001-change-more-reinterpret_cast-from-NULL-to-C-cast-see.patch
blob: fccba169df490136153225f4599e0ec8cb4ad7f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
From 0259f2b936ee0d9288ff39c509c69a66f5b13b80 Mon Sep 17 00:00:00 2001
From: Stefan Vigerske <svigerske@gams.com>
Date: Mon, 11 Mar 2019 16:34:25 +0000
Subject: [PATCH 1/2] change more reinterpret_cast from NULL to C-cast, see
 also #93

---
 Clp/src/AbcSimplex.cpp | 48 +++++++++++++++++++++---------------------
 Clp/src/ClpModel.cpp   |  2 +-
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/Clp/src/AbcSimplex.cpp b/Clp/src/AbcSimplex.cpp
index 0eacd91e..1715e6d8 100644
--- a/Clp/src/AbcSimplex.cpp
+++ b/Clp/src/AbcSimplex.cpp
@@ -368,19 +368,19 @@ AbcSimplex::gutsOfInitialize(int numberRows,int numberColumns,bool doMore)
     // say Steepest pricing
     abcDualRowPivot_ = new AbcDualRowSteepest();
     abcPrimalColumnPivot_ = new AbcPrimalColumnSteepest();
-    internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),
+    internalStatus_ = newArray((unsigned char *)NULL,
 			       sizeArray+maximumNumberTotal_);
-    abcLower_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    abcUpper_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
-    abcDj_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    abcSolution_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+maximumNumberTotal_);
-    //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
-    //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
-    scaleFromExternal_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    offset_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    abcPerturbation_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-    abcPivotVariable_ = newArray(reinterpret_cast<int *>(NULL),maximumAbcNumberRows_);
+    abcLower_ = newArray((double *)NULL,sizeArray);
+    abcUpper_ = newArray((double *)NULL,sizeArray);
+    abcCost_ = newArray((double *)NULL,sizeArray+maximumNumberTotal_);
+    abcDj_ = newArray((double *)NULL,sizeArray);
+    abcSolution_ = newArray((double *)NULL,sizeArray+maximumNumberTotal_);
+    //fromExternal_ = newArray((int *)NULL,sizeArray);
+    //toExternal_ = newArray((int *)NULL,sizeArray);
+    scaleFromExternal_ = newArray((double *)NULL,sizeArray);
+    offset_ = newArray((double *)NULL,sizeArray);
+    abcPerturbation_ = newArray((double *)NULL,sizeArray);
+    abcPivotVariable_ = newArray((int *)NULL,maximumAbcNumberRows_);
     // Fill perturbation array
     setupPointers(maximumAbcNumberRows_,maximumAbcNumberColumns_);
     fillPerturbation(0,maximumNumberTotal_);
@@ -554,19 +554,19 @@ AbcSimplex::createSubProblem(int numberColumns,const int * whichColumn)
   subProblem->maximumNumberTotal_= maximumAbcNumberRows_+numberColumns;
   subProblem->numberTotalWithoutFixed_= subProblem->numberTotal_;
   int sizeArray=2*subProblem->maximumNumberTotal_+maximumAbcNumberRows_;
-  subProblem->internalStatus_ = newArray(reinterpret_cast<unsigned char *>(NULL),
+  subProblem->internalStatus_ = newArray((unsigned char *)NULL,
 					 sizeArray+subProblem->maximumNumberTotal_);
-  subProblem->abcLower_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->abcUpper_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->abcCost_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+subProblem->maximumNumberTotal_);
-  subProblem->abcDj_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->abcSolution_ = newArray(reinterpret_cast<double *>(NULL),sizeArray+subProblem->maximumNumberTotal_);
-  //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
-  //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
-  subProblem->scaleFromExternal_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->offset_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->abcPerturbation_ = newArray(reinterpret_cast<double *>(NULL),sizeArray);
-  subProblem->abcPivotVariable_ = newArray(reinterpret_cast<int *>(NULL),maximumAbcNumberRows_);
+  subProblem->abcLower_ = newArray((double *)NULL,sizeArray);
+  subProblem->abcUpper_ = newArray((double *)NULL,sizeArray);
+  subProblem->abcCost_ = newArray((double *)NULL,sizeArray+subProblem->maximumNumberTotal_);
+  subProblem->abcDj_ = newArray((double *)NULL,sizeArray);
+  subProblem->abcSolution_ = newArray((double *)NULL,sizeArray+subProblem->maximumNumberTotal_);
+  //fromExternal_ = newArray((int *)NULL,sizeArray);
+  //toExternal_ = newArray((int *)NULL,sizeArray);
+  subProblem->scaleFromExternal_ = newArray((double *)NULL,sizeArray);
+  subProblem->offset_ = newArray((double *)NULL,sizeArray);
+  subProblem->abcPerturbation_ = newArray((double *)NULL,sizeArray);
+  subProblem->abcPivotVariable_ = newArray((int *)NULL,maximumAbcNumberRows_);
   subProblem->setupPointers(maximumAbcNumberRows_,numberColumns);
   // could use arrays - but for now be safe
   int * backward = new int [numberFullColumns+numberRows_];
diff --git a/Clp/src/ClpModel.cpp b/Clp/src/ClpModel.cpp
index 1fc905c4..83aa3b63 100644
--- a/Clp/src/ClpModel.cpp
+++ b/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*/,
+                       (const char*)NULL /*integrality*/,
                        getRowLower(), getRowUpper(),
                        columnNames, rowNames);
      // Pass in array saying if each variable integer
-- 
2.37.3