Internals: Favor std::array where easy. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-11-15 16:21:26 -05:00
parent f6f7684ccd
commit f4ef4ad9f3
14 changed files with 32 additions and 31 deletions
+2 -1
View File
@@ -1005,7 +1005,8 @@ class SplitPackedVarVisitor : public AstNVisitor, public SplitVarImpl {
}
UASSERT_OBJ(varp->attrSplitVar(), varp, "split_var attribute must be attached");
AstConst* consts[2] = {VN_CAST(nodep->lsbp(), Const), VN_CAST(nodep->widthp(), Const)};
std::array<AstConst*, 2> consts
= {VN_CAST(nodep->lsbp(), Const), VN_CAST(nodep->widthp(), Const)};
if (consts[0] && consts[1]) { // OK
refit->second.append(
PackedVarRefEntry(nodep, consts[0]->toSInt() + refit->second.basicp()->lsb(),