File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1978,6 +1978,7 @@ static bool isc_strConcat(const Token* tok)
19781978 if (!Token::Match (dot->astOperand2 (), " c_str|data ( )" ))
19791979 continue ;
19801980 cstr = op;
1981+ break ;
19811982 }
19821983 if (!cstr)
19831984 return false ;
@@ -2100,7 +2101,7 @@ void CheckStl::string_c_str()
21002101 tok->variable () && (tok->variable ()->isStlStringType () || tok->variable ()->isStlStringViewType ()) &&
21012102 tok->tokAt (2 )->variable () && tok->tokAt (2 )->variable ()->isStlStringType ()) {
21022103 string_c_strConstructor (tok, tok->variable ()->getTypeName ());
2103- else if (printPerformance && isc_strConcat (tok)) {
2104+ } else if (printPerformance && isc_strConcat (tok)) {
21042105 string_c_strConcat (tok);
21052106 } else if (printPerformance && Token::simpleMatch (tok, " <<" ) && tok->astOperand2 () && Token::Match (tok->astOperand2 ()->astOperand1 (), " . c_str|data ( )" )) {
21062107 const Token* str = tok->astOperand2 ()->astOperand1 ()->astOperand1 ();
You can’t perform that action at this time.
0 commit comments