Ignore:
Timestamp:
Mar 11, 2019 12:34:25 PM (8 months ago)
Author:
stefan
Message:

change more reinterpret_cast from NULL to C-cast, see also #93

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/AbcSimplex.cpp

    r2385 r2429  
    364364    abcDualRowPivot_ = new AbcDualRowSteepest();
    365365    abcPrimalColumnPivot_ = new AbcPrimalColumnSteepest();
    366     internalStatus_ = newArray(reinterpret_cast< unsigned char * >(NULL),
     366    internalStatus_ = newArray((unsigned char *)NULL,
    367367      sizeArray + maximumNumberTotal_);
    368     abcLower_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    369     abcUpper_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    370     abcCost_ = newArray(reinterpret_cast< double * >(NULL), sizeArray + maximumNumberTotal_);
    371     abcDj_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    372     abcSolution_ = newArray(reinterpret_cast< double * >(NULL), sizeArray + maximumNumberTotal_);
    373     //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
    374     //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
    375     scaleFromExternal_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    376     offset_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    377     abcPerturbation_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    378     abcPivotVariable_ = newArray(reinterpret_cast< int * >(NULL), maximumAbcNumberRows_);
     368    abcLower_ = newArray((double *)NULL, sizeArray);
     369    abcUpper_ = newArray((double *)NULL, sizeArray);
     370    abcCost_ = newArray((double *)NULL, sizeArray + maximumNumberTotal_);
     371    abcDj_ = newArray((double *)NULL, sizeArray);
     372    abcSolution_ = newArray((double *)NULL, sizeArray + maximumNumberTotal_);
     373    //fromExternal_ = newArray((int *)NULL,sizeArray);
     374    //toExternal_ = newArray((int *)NULL,sizeArray);
     375    scaleFromExternal_ = newArray((double *)NULL, sizeArray);
     376    offset_ = newArray((double *)NULL, sizeArray);
     377    abcPerturbation_ = newArray((double *)NULL, sizeArray);
     378    abcPivotVariable_ = newArray((int *)NULL, maximumAbcNumberRows_);
    379379    // Fill perturbation array
    380380    setupPointers(maximumAbcNumberRows_, maximumAbcNumberColumns_);
     
    548548  subProblem->numberTotalWithoutFixed_ = subProblem->numberTotal_;
    549549  int sizeArray = 2 * subProblem->maximumNumberTotal_ + maximumAbcNumberRows_;
    550   subProblem->internalStatus_ = newArray(reinterpret_cast< unsigned char * >(NULL),
     550  subProblem->internalStatus_ = newArray((unsigned char *)NULL,
    551551    sizeArray + subProblem->maximumNumberTotal_);
    552   subProblem->abcLower_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    553   subProblem->abcUpper_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    554   subProblem->abcCost_ = newArray(reinterpret_cast< double * >(NULL), sizeArray + subProblem->maximumNumberTotal_);
    555   subProblem->abcDj_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    556   subProblem->abcSolution_ = newArray(reinterpret_cast< double * >(NULL), sizeArray + subProblem->maximumNumberTotal_);
    557   //fromExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
    558   //toExternal_ = newArray(reinterpret_cast<int *>(NULL),sizeArray);
    559   subProblem->scaleFromExternal_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    560   subProblem->offset_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    561   subProblem->abcPerturbation_ = newArray(reinterpret_cast< double * >(NULL), sizeArray);
    562   subProblem->abcPivotVariable_ = newArray(reinterpret_cast< int * >(NULL), maximumAbcNumberRows_);
     552  subProblem->abcLower_ = newArray((double *)NULL, sizeArray);
     553  subProblem->abcUpper_ = newArray((double *)NULL, sizeArray);
     554  subProblem->abcCost_ = newArray((double *)NULL, sizeArray + subProblem->maximumNumberTotal_);
     555  subProblem->abcDj_ = newArray((double *)NULL, sizeArray);
     556  subProblem->abcSolution_ = newArray((double *)NULL, sizeArray + subProblem->maximumNumberTotal_);
     557  //fromExternal_ = newArray((int *)NULL,sizeArray);
     558  //toExternal_ = newArray((int *)NULL,sizeArray);
     559  subProblem->scaleFromExternal_ = newArray((double *)NULL, sizeArray);
     560  subProblem->offset_ = newArray((double *)NULL, sizeArray);
     561  subProblem->abcPerturbation_ = newArray((double *)NULL, sizeArray);
     562  subProblem->abcPivotVariable_ = newArray((int *)NULL, maximumAbcNumberRows_);
    563563  subProblem->setupPointers(maximumAbcNumberRows_, numberColumns);
    564564  // could use arrays - but for now be safe
Note: See TracChangeset for help on using the changeset viewer.