Commit 0c533588 authored by hanchuan's avatar hanchuan
Browse files

[bugfix] Fix the assert position

parent bbb6637b
Pipeline #4004 waiting for manual action with stages
......@@ -176,9 +176,9 @@ private:
static constexpr int phaseIdx(int brinePhaseIdx) { return liquidPhaseIdx; }
static constexpr int compIdx(int brineCompIdx)
{
assert(brineCompIdx == VariableSalinityBrine::H2OIdx || brineCompIdx == VariableSalinityBrine::NaClIdx);
switch (brineCompIdx)
{
assert(brineCompIdx == VariableSalinityBrine::H2OIdx || brineCompIdx == VariableSalinityBrine::NaClIdx);
case VariableSalinityBrine::H2OIdx: return BrineOrH2OIdx;
case VariableSalinityBrine::NaClIdx: return NaClIdx;
default: return 0; // this will never be reached, only needed to suppress compiler warning
......
......@@ -228,13 +228,10 @@ private:
static constexpr int phaseIdx(int brinePhaseIdx) { return wPhaseIdx; }
static constexpr int compIdx(int brineCompIdx)
{
assert( brineCompIdx == Brine::H2OIdx || brineCompIdx == Brine::NaIdx
|| brineCompIdx == Brine::ClIdx || brineCompIdx == Brine::CaIdx);
switch (brineCompIdx)
{
assert(brineCompIdx == Brine::H2OIdx
|| brineCompIdx == Brine::NaIdx
|| brineCompIdx == Brine::ClIdx
|| brineCompIdx == Brine::CaIdx
);
case Brine::H2OIdx: return H2OIdx;
case Brine::NaIdx: return NaIdx;
case Brine::ClIdx: return ClIdx;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment