mark conditionally used parameters as maybe_unused

and anonymize unused parameters
This commit is contained in:
Arne Morten Kvarving 2020-04-14 14:16:20 +02:00
parent c504002568
commit 1afaba329a
2 changed files with 6 additions and 6 deletions

View File

@ -163,14 +163,14 @@ public:
priVars[saltConcentrationIdx] = fluidState.saltConcentration();
}
static std::string primaryVarName(unsigned pvIdx)
static std::string primaryVarName([[maybe_unused]] unsigned pvIdx)
{
assert(primaryVarApplies(pvIdx));
return "saltConcentration";
}
static Scalar primaryVarWeight(unsigned pvIdx OPM_OPTIM_UNUSED)
static Scalar primaryVarWeight([[maybe_unused]] unsigned pvIdx)
{
assert(primaryVarApplies(pvIdx));
@ -186,14 +186,14 @@ public:
return eqIdx == contiBrineEqIdx;
}
static std::string eqName(unsigned eqIdx)
static std::string eqName([[maybe_unused]] unsigned eqIdx)
{
assert(eqApplies(eqIdx));
return "conti^brine";
}
static Scalar eqWeight(unsigned eqIdx OPM_OPTIM_UNUSED)
static Scalar eqWeight([[maybe_unused]] unsigned eqIdx)
{
assert(eqApplies(eqIdx));

View File

@ -122,12 +122,12 @@ struct BlackOilOnePhaseIndices
//////////////////////
//! \brief returns the index of "active" component
static unsigned canonicalToActiveComponentIndex(unsigned compIdx OPM_UNUSED)
static unsigned canonicalToActiveComponentIndex(unsigned /*compIdx*/)
{
return 0;
}
static unsigned activeToCanonicalComponentIndex(unsigned compIdx)
static unsigned activeToCanonicalComponentIndex([[maybe_unused]] unsigned compIdx)
{
// assumes canonical oil = 0, water = 1, gas = 2;
assert(compIdx == 0);