remove EWOMS_GET_PARAM_LISTS macro

it adds no simplicity and only obfuscates
This commit is contained in:
Arne Morten Kvarving 2024-03-22 12:24:18 +01:00
parent a2ff5e98ee
commit 399e39b31b
2 changed files with 7 additions and 12 deletions

View File

@ -109,17 +109,6 @@
getPropValue<TypeTag, Properties::ParamName>(), \
/*errorIfNotRegistered=*/false))
/*!
* \ingroup Parameter
*
* \brief Retrieves the lists of parameters specified at runtime and their values.
*
* The two arguments besides the TypeTag are assumed to be STL containers which store
* std::pair<std::string, std::string>.
*/
#define EWOMS_GET_PARAM_LISTS(TypeTag, UsedParamList, UnusedParamList) \
(::Opm::Parameters::getLists<TypeTag>(UsedParamList, UnusedParamList))
namespace Opm {
namespace Parameters {
@ -1088,6 +1077,12 @@ const ParamType get(const char *propTagName, const char *paramName, const ParamT
return Param<TypeTag>::template get<ParamType>(propTagName, paramName, defaultValue, errorIfNotRegistered);
}
/*!
* \brief Retrieves the lists of parameters specified at runtime and their values.
*
* The two arguments besides the TypeTag are assumed to be STL containers which store
* std::pair<std::string, std::string>.
*/
template <class TypeTag, class Container>
void getLists(Container& usedParams, Container& unusedParams)
{

View File

@ -181,7 +181,7 @@ static inline int setupParameters_(int argc,
ParamList usedParams;
ParamList unusedParams;
EWOMS_GET_PARAM_LISTS(TypeTag, usedParams, unusedParams);
Parameters::getLists<TypeTag>(usedParams, unusedParams);
if (!allowUnused && !unusedParams.empty()) {
if (myRank == 0) {
if (unusedParams.size() == 1)