Skip to content

Commit 014a21f

Browse files
committed
Revert "Fix bug in duplicate submeter reference check"
This reverts commit ef754ec. Inadvertent commit to main
1 parent ef754ec commit 014a21f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cnguts.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ static RC checkSubMeterList( // helper for input-time checking submeter list
21452145
{
21462146
RC rc = RCOK;
21472147

2148-
std::vector<TI> seenList;
2148+
bool bSeen[DIM_SUBMETERLIST] = { false };
21492149

21502150
const TI* subMeterList = reinterpret_cast<const TI*>(pR->field(fnList));
21512151

@@ -2154,7 +2154,7 @@ static RC checkSubMeterList( // helper for input-time checking submeter list
21542154
const char* msg = nullptr;
21552155
if (subMeterList[i] == pR->ss)
21562156
msg = "Invalid submeter self-reference";
2157-
else if (std::find( seenList.begin(), seenList.end(), subMeterList[i]) != seenList.end())
2157+
else if (bSeen[subMeterList[i]])
21582158
msg = "Duplicate submeter reference";
21592159

21602160
if (msg)
@@ -2164,7 +2164,7 @@ static RC checkSubMeterList( // helper for input-time checking submeter list
21642164
pRSM ? pRSM->Name() : "?", i + 1, listArgName, msg);
21652165
}
21662166

2167-
seenList.push_back( subMeterList[ i]);
2167+
bSeen[subMeterList[i]] = true;
21682168
}
21692169

21702170
return rc;

0 commit comments

Comments
 (0)