Ignore:
Timestamp:
Jan 3, 2019 2:03:23 PM (10 months ago)
Author:
unxusr
Message:

.clang-format with proposal for formatting code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcBranchingObject.cpp

    r1899 r2464  
    88#if defined(_MSC_VER)
    99// Turn off compiler warning about long names
    10 #  pragma warning(disable:4786)
     10#pragma warning(disable : 4786)
    1111#endif
    1212#include <cassert>
     
    2222#include "CbcBranchBase.hpp"
    2323
    24 
    2524// Default Constructor
    2625CbcBranchingObject::CbcBranchingObject()
    27         : OsiBranchingObject()
     26  : OsiBranchingObject()
    2827{
    29     model_ = NULL;
    30     originalCbcObject_ = NULL;
    31     variable_ = -1;
    32     way_ = 0;
     28  model_ = NULL;
     29  originalCbcObject_ = NULL;
     30  variable_ = -1;
     31  way_ = 0;
    3332}
    3433
    3534// Useful constructor
    36 CbcBranchingObject::CbcBranchingObject (CbcModel * model, int variable, int way , double value)
    37         : OsiBranchingObject(model->solver(), value)
     35CbcBranchingObject::CbcBranchingObject(CbcModel *model, int variable, int way, double value)
     36  : OsiBranchingObject(model->solver(), value)
    3837{
    39     model_ = model;
    40     originalCbcObject_ = NULL;
    41     variable_ = variable;
    42     way_ = way;
     38  model_ = model;
     39  originalCbcObject_ = NULL;
     40  variable_ = variable;
     41  way_ = way;
    4342}
    4443
    4544// Copy constructor
    46 CbcBranchingObject::CbcBranchingObject ( const CbcBranchingObject & rhs)
    47         : OsiBranchingObject(rhs)
     45CbcBranchingObject::CbcBranchingObject(const CbcBranchingObject &rhs)
     46  : OsiBranchingObject(rhs)
    4847{
     48  model_ = rhs.model_;
     49  originalCbcObject_ = rhs.originalCbcObject_;
     50  variable_ = rhs.variable_;
     51  way_ = rhs.way_;
     52  value_ = rhs.value_;
     53}
     54
     55// Assignment operator
     56CbcBranchingObject &
     57CbcBranchingObject::operator=(const CbcBranchingObject &rhs)
     58{
     59  if (this != &rhs) {
     60    OsiBranchingObject::operator=(rhs);
    4961    model_ = rhs.model_;
    5062    originalCbcObject_ = rhs.originalCbcObject_;
    5163    variable_ = rhs.variable_;
    5264    way_ = rhs.way_;
    53     value_ = rhs.value_;
    54 }
    55 
    56 // Assignment operator
    57 CbcBranchingObject &
    58 CbcBranchingObject::operator=( const CbcBranchingObject & rhs)
    59 {
    60     if (this != &rhs) {
    61         OsiBranchingObject::operator=(rhs);
    62         model_ = rhs.model_;
    63         originalCbcObject_ = rhs.originalCbcObject_;
    64         variable_ = rhs.variable_;
    65         way_ = rhs.way_;
    66     }
    67     return *this;
     65  }
     66  return *this;
    6867}
    6968
    7069// Destructor
    71 CbcBranchingObject::~CbcBranchingObject ()
     70CbcBranchingObject::~CbcBranchingObject()
    7271{
    7372}
    74 
Note: See TracChangeset for help on using the changeset viewer.