Changeset 1786 for trunk


Ignore:
Timestamp:
Aug 31, 2011 6:22:27 AM (8 years ago)
Author:
forrest
Message:

minor bug fix on copy without status array

File:
1 edited

Legend:

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

    r1732 r1786  
    32323232     rowObjective_ = whichDouble(rhs->rowObjective_, numberRows, whichRow);
    32333233     // status has to be done in two stages
    3234      status_ = new unsigned char[numberColumns_+numberRows_];
    3235      unsigned char * rowStatus = whichUnsignedChar(rhs->status_ + rhs->numberColumns_,
    3236                                  numberRows_, whichRow);
    3237      unsigned char * columnStatus = whichUnsignedChar(rhs->status_,
    3238                                     numberColumns_, whichColumn);
    3239      CoinMemcpyN(rowStatus, numberRows_, status_ + numberColumns_);
    3240      delete [] rowStatus;
    3241      CoinMemcpyN(columnStatus, numberColumns_, status_);
    3242      delete [] columnStatus;
     3234     if (rhs->status_) {
     3235       status_ = new unsigned char[numberColumns_+numberRows_];
     3236       unsigned char * rowStatus = whichUnsignedChar(rhs->status_ + rhs->numberColumns_,
     3237                                                     numberRows_, whichRow);
     3238       unsigned char * columnStatus = whichUnsignedChar(rhs->status_,
     3239                                                        numberColumns_, whichColumn);
     3240       CoinMemcpyN(rowStatus, numberRows_, status_ + numberColumns_);
     3241       delete [] rowStatus;
     3242       CoinMemcpyN(columnStatus, numberColumns_, status_);
     3243       delete [] columnStatus;
     3244     } else {
     3245       status_=NULL;
     3246     }
    32433247     ray_ = NULL;
    32443248     if (problemStatus_ == 1)
Note: See TracChangeset for help on using the changeset viewer.