astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2020-01-31 14:13:52 +01:00
parent b0ce3e4c0c
commit fb38e87bf4
4 changed files with 20 additions and 23 deletions

View File

@ -60,7 +60,8 @@ static const cppcheck::Platform::PlatformType builtinPlatforms[] = {
static const int numberOfBuiltinPlatforms = sizeof(builtinPlatforms) / sizeof(builtinPlatforms[0]);
QStringList ProjectFileDialog::getProjectConfigs(const QString &fileName) {
QStringList ProjectFileDialog::getProjectConfigs(const QString &fileName)
{
QStringList ret;
ImportProject importer;
Settings projSettings;
@ -338,9 +339,7 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile)
QList<QListWidgetItem*> items = mUI.mListVsConfigs->findItems(cfg, Qt::MatchFlag::MatchExactly);
items[0]->setSelected(true);
}
}
else
{
} else {
mUI.mListVsConfigs->clear();
mUI.mListVsConfigs->setEnabled(false);
}

View File

@ -1361,8 +1361,7 @@ void CppCheck::analyseClangTidy(const ImportProject::FileSettings &fileSettings
}
std::string::size_type pos = 0u;
while ((pos = allDefines.find(";", pos)) != std::string::npos)
{
while ((pos = allDefines.find(";", pos)) != std::string::npos) {
allDefines.replace(pos, 1, " -D");
pos += 3;
}
@ -1378,8 +1377,7 @@ void CppCheck::analyseClangTidy(const ImportProject::FileSettings &fileSettings
std::istringstream istr(result.second);
std::string line;
if (!mSettings.buildDir.empty())
{
if (!mSettings.buildDir.empty()) {
const std::string analyzerInfoFile = AnalyzerInformation::getAnalyzerInfoFile(mSettings.buildDir, fileSettings.filename, "");
std::ofstream fcmd(analyzerInfoFile + ".clang-tidy-cmd");
fcmd << istr.str();