File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2145,7 +2145,7 @@ static RC checkSubMeterList( // helper for input-time checking submeter list
21452145{
21462146 RC rc = RCOK;
21472147
2148- bool bSeen[DIM_SUBMETERLIST] = { false } ;
2148+ std::vector<TI> seenList ;
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 (bSeen[ subMeterList[i]] )
2157+ else if (std::find ( seenList. begin (), seenList. end (), subMeterList[i]) != seenList. end () )
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- bSeen[ subMeterList[i]] = true ;
2167+ seenList. push_back ( subMeterList[ i]) ;
21682168 }
21692169
21702170 return rc;
You can’t perform that action at this time.
0 commit comments