diff --git a/opm/core/wells/WellsGroup.cpp b/opm/core/wells/WellsGroup.cpp index e1bed0cb..8c541431 100644 --- a/opm/core/wells/WellsGroup.cpp +++ b/opm/core/wells/WellsGroup.cpp @@ -762,27 +762,16 @@ namespace Opm } } -// macro to insert const_cast to get a round bug in GCC 4.6.3 where it -// suddenly believes that "this" is a const pointer, although we are not -// in a const method. -#if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 6 ) && ( __GNUC_PATCHLEVEL__ == 3 ) -#define CONST_CAST(T,v) const_cast(v) -#else -#define CONST_CAST(T,v) v -#endif - std::pair WellNode::getWorstOffending(const std::vector& well_reservoirrates_phase, const std::vector& well_surfacerates_phase, ProductionSpecification::ControlMode mode) { const int np = phaseUsage().num_phases; const int index = self_index_*np; - // note: CONST_CAST is just to work around a bug in GCC 4.6.3; it - // is not really needed, and should be a harmless no-op. - return std::make_pair(CONST_CAST(WellNode*,this), - rateByMode(&well_reservoirrates_phase[index], - &well_surfacerates_phase[index], - mode)); + return std::pair(this, + rateByMode(&well_reservoirrates_phase[index], + &well_surfacerates_phase[index], + mode)); } void WellNode::applyInjGroupControl(const InjectionSpecification::ControlMode control_mode,