Changeset 1792 for trunk


Ignore:
Timestamp:
Sep 9, 2011 4:58:16 AM (8 years ago)
Author:
forrest
Message:

obscure bug on mix of adds using simplex and coinmodel

File:
1 edited

Legend:

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

    r1786 r1792  
    33653365ClpModel::copyRowNames(const std::vector<std::string> & rowNames, int first, int last)
    33663366{
     3367     // Do column names if necessary
     3368     if (!lengthNames_&&numberColumns_) {
     3369       lengthNames_=8;
     3370       copyColumnNames(NULL,0,numberColumns_);
     3371     }
    33673372     unsigned int maxLength = lengthNames_;
    33683373     int size = static_cast<int>(rowNames_.size());
     
    33813386ClpModel::copyColumnNames(const std::vector<std::string> & columnNames, int first, int last)
    33823387{
     3388     // Do row names if necessary
     3389     if (!lengthNames_&&numberRows_) {
     3390       lengthNames_=8;
     3391       copyRowNames(NULL,0,numberRows_);
     3392     }
    33833393     unsigned int maxLength = lengthNames_;
    33843394     int size = static_cast<int>(columnNames_.size());
     
    33973407ClpModel::copyRowNames(const char * const * rowNames, int first, int last)
    33983408{
     3409     // Do column names if necessary
     3410     if (!lengthNames_&&numberColumns_) {
     3411       lengthNames_=8;
     3412       copyColumnNames(NULL,0,numberColumns_);
     3413     }
    33993414     unsigned int maxLength = lengthNames_;
    34003415     int size = static_cast<int>(rowNames_.size());
     
    34033418     int iRow;
    34043419     for (iRow = first; iRow < last; iRow++) {
    3405           if (rowNames[iRow-first] && strlen(rowNames[iRow-first])) {
     3420          if (rowNames && rowNames[iRow-first] && strlen(rowNames[iRow-first])) {
    34063421               rowNames_[iRow] = rowNames[iRow-first];
    34073422               maxLength = CoinMax(maxLength, static_cast<unsigned int> (strlen(rowNames[iRow-first])));
     
    34203435ClpModel::copyColumnNames(const char * const * columnNames, int first, int last)
    34213436{
     3437     // Do row names if necessary
     3438     if (!lengthNames_&&numberRows_) {
     3439       lengthNames_=8;
     3440       copyRowNames(NULL,0,numberRows_);
     3441     }
    34223442     unsigned int maxLength = lengthNames_;
    34233443     int size = static_cast<int>(columnNames_.size());
     
    34263446     int iColumn;
    34273447     for (iColumn = first; iColumn < last; iColumn++) {
    3428           if (columnNames[iColumn-first] && strlen(columnNames[iColumn-first])) {
     3448          if (columnNames && columnNames[iColumn-first] && strlen(columnNames[iColumn-first])) {
    34293449               columnNames_[iColumn] = columnNames[iColumn-first];
    34303450               maxLength = CoinMax(maxLength, static_cast<unsigned int> (strlen(columnNames[iColumn-first])));
Note: See TracChangeset for help on using the changeset viewer.