From b470cc9d54ea91b4a738d26d233f8975ec82ae68 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Mon, 17 Apr 2023 14:47:10 +0200 Subject: [PATCH] Drop COIN_HAS_NTY from public header CbcModel.hpp 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 #591 --- Cbc/src/CbcModel.cpp | 6 ------ Cbc/src/CbcModel.hpp | 2 -- 2 files changed, 8 deletions(-) diff --git a/Cbc/src/CbcModel.cpp b/Cbc/src/CbcModel.cpp index 1a181e700..47db686f0 100644 --- a/Cbc/src/CbcModel.cpp +++ b/Cbc/src/CbcModel.cpp @@ -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" @@ -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) @@ -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) diff --git a/Cbc/src/CbcModel.hpp b/Cbc/src/CbcModel.hpp index ed811bc98..da62f3ad6 100644 --- a/Cbc/src/CbcModel.hpp +++ b/Cbc/src/CbcModel.hpp @@ -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_;