Skip to content

Commit

Permalink
Drop COIN_HAS_NTY from public header CbcModel.hpp
Browse files Browse the repository at this point in the history
COIN_HAS_NTY is only defined during compilation of Cbc but is used in
public header CbcModel.hpp
Hiding attributes to 3rd party code can lead to crashes from alignment issues

Closes coin-or#591
  • Loading branch information
jschueller committed Apr 17, 2023
1 parent 1857fd6 commit b470cc9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions Cbc/src/CbcModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ extern int gomory_try;
#include "CbcFeasibilityBase.hpp"
#include "CbcFathom.hpp"
#include "CbcFullNodeInfo.hpp"
#ifdef COIN_HAS_NTY
#include "CbcSymmetry.hpp"
#endif
// include Probing
#include "CglProbing.hpp"
#include "CglGomory.hpp"
Expand Down Expand Up @@ -5870,10 +5868,8 @@ CbcModel::CbcModel()
, lastHeuristic_(NULL)
, fastNodeDepth_(-1)
, eventHandler_(NULL)
#ifdef COIN_HAS_NTY
, symmetryInfo_(NULL)
, rootSymmetryInfo_(NULL)
#endif
, numberObjects_(0)
, object_(NULL)
, ownObjects_(true)
Expand Down Expand Up @@ -6043,10 +6039,8 @@ CbcModel::CbcModel(const OsiSolverInterface &rhs)
, lastHeuristic_(NULL)
, fastNodeDepth_(-1)
, eventHandler_(NULL)
#ifdef COIN_HAS_NTY
, symmetryInfo_(NULL)
, rootSymmetryInfo_(NULL)
#endif
, numberObjects_(0)
, object_(NULL)
, ownObjects_(true)
Expand Down
2 changes: 0 additions & 2 deletions Cbc/src/CbcModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3115,12 +3115,10 @@ class CbcModel {
#else
CbcEventHandler *eventHandler_;
#endif
#ifdef COIN_HAS_NTY
/// Symmetry information
CbcSymmetry *symmetryInfo_;
/// Root symmetry information
CbcSymmetry *rootSymmetryInfo_;
#endif
/// Total number of objects
int numberObjects_;

Expand Down

0 comments on commit b470cc9

Please sign in to comment.