Skip to content

Commit 2f9bc54

Browse files
Update checkother.cpp
1 parent 648d1c8 commit 2f9bc54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/checkother.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,8 +1407,11 @@ void CheckOther::checkPassByReference()
14071407
if (inconclusive && !mSettings->certainty.isEnabled(Certainty::inconclusive))
14081408
continue;
14091409

1410+
if (var->isArray() && var->getTypeName() != "std::array")
1411+
continue;
1412+
14101413
const bool isConst = var->isConst();
1411-
if (isConst && !var->isArray()) {
1414+
if (isConst) {
14121415
passedByValueError(var, inconclusive, isRangeBasedFor);
14131416
continue;
14141417
}

0 commit comments

Comments
 (0)