Avoid a preprocessor directives.

Some of the functions in Main.hpp do not need to be guarded by a
\#ifndef OPM_FLOW_MAIN
Since they are template functions, they will not be included in the
code unless explicitly instantiated.
This commit is contained in:
Håkon Hægland 2020-04-14 12:55:02 +02:00
parent 3624725885
commit efa6c54096

View File

@ -93,7 +93,9 @@ NEW_TYPE_TAG(FlowEarlyBird, INHERITS_FROM(EclFlowProblem));
END_PROPERTIES END_PROPERTIES
#ifndef OPM_FLOW_MAIN //#ifndef OPM_FLOW_MAIN // NOTE: since the methods in this #ifndef block are
// are template functions they will not be included
// in the code if not used, so #ifndef is commented out
namespace Opm { namespace Opm {
template <class TypeTag> template <class TypeTag>
void flowEbosSetDeck(Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig) void flowEbosSetDeck(Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
@ -124,7 +126,7 @@ namespace Opm {
} }
#endif /* #ifndef OPM_FLOW_MAIN */ //#endif /* #ifndef OPM_FLOW_MAIN */
namespace Opm namespace Opm
{ {