Skip to content

Commit a923f52

Browse files
Update checkstl.cpp
1 parent 2480f72 commit a923f52

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/checkstl.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ void CheckStlImpl::mismatchingContainersError(const Token* tok1, const Token* to
656656
{
657657
const std::string expr1(tok1 ? tok1->expressionString() : std::string("v1"));
658658
const std::string expr2(tok2 ? tok2->expressionString() : std::string("v2"));
659-
const std::string dataStr = (ltk == ValueFlow::Value::LifetimeKind::Iterator) ? "Iterators" : (ltk == ValueFlow::Value::LifetimeKind::Address ? "Addresses" : "Pointers" );
659+
const std::string dataStr = (ltk == ValueFlow::Value::LifetimeKind::Iterator) ? "Iterators" : (ltk == ValueFlow::Value::LifetimeKind::Address ? "Addresses" : "Pointers");
660660
const std::string objectStr = (ltk == ValueFlow::Value::LifetimeKind::Iterator || ltk == ValueFlow::Value::LifetimeKind::Object) ? "containers '" : "objects '";
661661
reportError(tok1,
662662
Severity::error,
@@ -793,7 +793,7 @@ bool CheckStlImpl::checkIteratorPair(const Token* tok1, const Token* tok2)
793793
if (val1.tokvalue->expressionString() == val2.tokvalue->expressionString())
794794
iteratorsError(tok1, val1.tokvalue, val1.tokvalue->expressionString());
795795
else
796-
mismatchingContainersError(val1.tokvalue, val2.tokvalue);
796+
mismatchingContainersError(val1.tokvalue, val2.tokvalue, val1.lifetimeKind);
797797
return true;
798798
}
799799

0 commit comments

Comments
 (0)