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