astyle formatting

This commit is contained in:
Daniel Marjamäki 2011-04-20 06:41:26 +02:00
parent aac65247ba
commit 46afc54c10
2 changed files with 6 additions and 6 deletions

View File

@ -2517,11 +2517,11 @@ void CheckOther::checkConstantFunctionParameter()
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next()) for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
{ {
// TODO: False negatives. This pattern only checks for string. // TODO: False negatives. This pattern only checks for string.
// Investigate if there are other classes in the std // Investigate if there are other classes in the std
// namespace and add them to the pattern. There are // namespace and add them to the pattern. There are
// streams for example (however it seems strange with // streams for example (however it seems strange with
// const stream parameter). // const stream parameter).
if (Token::Match(tok, "[,(] const std :: string %var% [,)]")) if (Token::Match(tok, "[,(] const std :: string %var% [,)]"))
{ {
passedByValueError(tok, tok->strAt(5)); passedByValueError(tok, tok->strAt(5));

View File

@ -669,7 +669,7 @@ private:
// remove outer if (#2733) // remove outer if (#2733)
ASSERT_EQUALS("alloc ; return ; }", simplifycode("alloc ; if { if return use ; } return ; }")); ASSERT_EQUALS("alloc ; return ; }", simplifycode("alloc ; if { if return use ; } return ; }"));
ASSERT_EQUALS("alloc ; return ; }", simplifycode("alloc ; if { if(var) return use ; } return ; }")); ASSERT_EQUALS("alloc ; return ; }", simplifycode("alloc ; if { if(var) return use ; } return ; }"));
TODO_ASSERT_EQUALS("alloc ; return ; }", TODO_ASSERT_EQUALS("alloc ; return ; }",
"alloc ; if(var) { if return use ; } return ; }", "alloc ; if(var) { if return use ; } return ; }",
simplifycode("alloc ; if(var) { if return use ; } return ; }")); simplifycode("alloc ; if(var) { if return use ; } return ; }"));