astyle fix
This commit is contained in:
parent
e0ea4228cd
commit
91e89380c2
|
@ -253,16 +253,15 @@ unsigned int CppCheck::processFile()
|
|||
} catch (ErrorLogger::ErrorMessage &err) {
|
||||
// Catch exception from Token class
|
||||
const std::string fixedpath = Path::toNativeSeparators(_filename);
|
||||
if( err._callStack.empty() ){
|
||||
if (err._callStack.empty()) {
|
||||
ErrorLogger::ErrorMessage::FileLocation loc;
|
||||
loc.setfile(fixedpath);
|
||||
err._callStack.push_back(loc);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
err._callStack.begin()->setfile(fixedpath);
|
||||
}
|
||||
|
||||
_errorLogger.reportErr(err );
|
||||
_errorLogger.reportErr(err);
|
||||
}
|
||||
|
||||
if (!_settings._errorsOnly)
|
||||
|
|
|
@ -542,7 +542,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
|||
"Internal error. Token::Match called with varid 0.",
|
||||
"cppcheckError",
|
||||
false);
|
||||
throw errmsg;
|
||||
throw errmsg;
|
||||
}
|
||||
|
||||
if (tok->varId() != varid)
|
||||
|
|
|
@ -279,7 +279,7 @@ private:
|
|||
givenACodeSampleToTokenize var("int a ; int b ;");
|
||||
|
||||
// Varid == 0 should throw exception
|
||||
ASSERT_THROW(Token::Match(var.tokens(), "%type% %varid% ; %type% %var%", 0),ErrorLogger::ErrorMessage );
|
||||
ASSERT_THROW(Token::Match(var.tokens(), "%type% %varid% ; %type% %var%", 0),ErrorLogger::ErrorMessage);
|
||||
|
||||
ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %varid% ; %type% %var%", 1));
|
||||
ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %var% ; %type% %varid%", 2));
|
||||
|
|
Loading…
Reference in New Issue