Commit e2ce17ef authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Fix "! condition" coding style

Change-Id: Ic7e634e4249fb64edbc2daceb65ec8e9b5f0f8b9
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarAurindam Jana <aurindam.jana@digia.com>
parent 782b9994
......@@ -59,7 +59,7 @@ static void parse(QFutureInterface<void> &future,
const bool isSourceFile = i < sourceCount;
if (isSourceFile) {
(void) preproc->run(conf);
} else if (! processingHeaders) {
} else if (!processingHeaders) {
(void) preproc->run(conf);
processingHeaders = true;
......@@ -182,7 +182,7 @@ QFuture<void> BuiltinIndexingSupport::refreshSourceFiles(const QStringList &sour
m_synchronizer.clearFutures();
foreach (const QFuture<void> &future, futures) {
if (! (future.isFinished() || future.isCanceled()))
if (!(future.isFinished() || future.isCanceled()))
m_synchronizer.addFuture(future);
}
}
......
......@@ -94,9 +94,9 @@ public:
protected:
void process(Document::Ptr doc, QSet<Namespace *> *processed)
{
if (! doc)
if (!doc)
return;
if (! processed->contains(doc->globalNamespace())) {
if (!processed->contains(doc->globalNamespace())) {
processed->insert(doc->globalNamespace());
foreach (const Document::Include &i, doc->includes())
......@@ -115,7 +115,7 @@ protected:
void addType(const Name *name)
{
if (! name) {
if (!name) {
return;
} else if (const QualifiedNameId *q = name->asQualifiedNameId()) {
......@@ -130,7 +130,7 @@ protected:
void addField(const Name *name)
{
if (! name) {
if (!name) {
return;
} else if (name->isNameId()) {
......@@ -142,7 +142,7 @@ protected:
void addFunction(const Name *name)
{
if (! name) {
if (!name) {
return;
} else if (name->isNameId()) {
......@@ -153,7 +153,7 @@ protected:
void addStatic(const Name *name)
{
if (! name) {
if (!name) {
return;
} else if (name->isNameId() || name->isTemplateNameId()) {
......@@ -196,7 +196,7 @@ protected:
if (symbol->isTypedef())
addType(symbol->name());
else if (! symbol->type()->isFunctionType() && symbol->enclosingScope()->isClass())
else if (!symbol->type()->isFunctionType() && symbol->enclosingScope()->isClass())
addField(symbol->name());
return true;
......@@ -333,7 +333,7 @@ void CheckSymbols::run()
qSort(_macroUses.begin(), _macroUses.end(), sortByLinePredicate);
_doc->clearDiagnosticMessages();
if (! isCanceled()) {
if (!isCanceled()) {
if (_doc->translationUnit()) {
accept(_doc->translationUnit()->ast());
_usages << QVector<Result>::fromList(_macroUses);
......@@ -473,7 +473,7 @@ bool CheckSymbols::visit(NamespaceAST *ast)
{
if (ast->identifier_token) {
const Token &tok = tokenAt(ast->identifier_token);
if (! tok.generated()) {
if (!tok.generated()) {
unsigned line, column;
getTokenStartPosition(ast->identifier_token, &line, &column);
Result use(line, column, tok.length(), CppHighlightingSupport::TypeUse);
......@@ -499,7 +499,7 @@ bool CheckSymbols::visit(SimpleDeclarationAST *ast)
{
NameAST *declrIdNameAST = 0;
if (ast->declarator_list && !ast->declarator_list->next) {
if (ast->symbols && ! ast->symbols->next && !ast->symbols->value->isGenerated()) {
if (ast->symbols && !ast->symbols->next && !ast->symbols->value->isGenerated()) {
Symbol *decl = ast->symbols->value;
if (NameAST *nameAST = declaratorId(ast->declarator_list->value)) {
if (Function *funTy = decl->type()->asFunctionType()) {
......@@ -559,7 +559,7 @@ bool CheckSymbols::visit(ElaboratedTypeSpecifierAST *ast)
bool CheckSymbols::visit(MemberAccessAST *ast)
{
accept(ast->base_expression);
if (! ast->member_name)
if (!ast->member_name)
return false;
if (const Name *name = ast->member_name->name) {
......@@ -711,7 +711,7 @@ QByteArray CheckSymbols::textOf(AST *ast) const
void CheckSymbols::checkNamespace(NameAST *name)
{
if (! name)
if (!name)
return;
unsigned line, column;
......@@ -730,13 +730,13 @@ void CheckSymbols::checkNamespace(NameAST *name)
bool CheckSymbols::hasVirtualDestructor(Class *klass) const
{
if (! klass)
if (!klass)
return false;
const Identifier *id = klass->identifier();
if (! id)
if (!id)
return false;
for (Symbol *s = klass->find(id); s; s = s->next()) {
if (! s->name())
if (!s->name())
continue;
if (s->name()->isDestructorNameId()) {
if (Function *funTy = s->type()->asFunctionType()) {
......@@ -754,9 +754,9 @@ bool CheckSymbols::hasVirtualDestructor(ClassOrNamespace *binding) const
QList<ClassOrNamespace *> todo;
todo.append(binding);
while (! todo.isEmpty()) {
while (!todo.isEmpty()) {
ClassOrNamespace *b = todo.takeFirst();
if (b && ! processed.contains(b)) {
if (b && !processed.contains(b)) {
processed.insert(b);
foreach (Symbol *s, b->symbols()) {
if (Class *k = s->asClass()) {
......@@ -775,7 +775,7 @@ bool CheckSymbols::hasVirtualDestructor(ClassOrNamespace *binding) const
void CheckSymbols::checkName(NameAST *ast, Scope *scope)
{
if (ast && ast->name) {
if (! scope)
if (!scope)
scope = enclosingScope();
if (ast->asDestructorName() != 0) {
......@@ -796,7 +796,7 @@ void CheckSymbols::checkName(NameAST *ast, Scope *scope)
}
}
} else if (maybeType(ast->name) || maybeStatic(ast->name)) {
if (! maybeAddTypeOrStatic(_context.lookup(ast->name, scope), ast)) {
if (!maybeAddTypeOrStatic(_context.lookup(ast->name, scope), ast)) {
// it can be a local variable
if (maybeField(ast->name))
maybeAddField(_context.lookup(ast->name, scope), ast);
......@@ -895,7 +895,7 @@ ClassOrNamespace *CheckSymbols::checkNestedName(QualifiedNameAST *ast)
}
accept(template_id->template_argument_list);
if (! binding)
if (!binding)
continue;
}
......@@ -1026,7 +1026,7 @@ bool CheckSymbols::visit(FunctionDefinitionAST *ast)
_astStack.append(thisFunction);
bool processEntireDeclr = true;
if (ast->declarator && ast->symbol && ! ast->symbol->isGenerated()) {
if (ast->declarator && ast->symbol && !ast->symbol->isGenerated()) {
Function *fun = ast->symbol;
if (NameAST *declId = declaratorId(ast->declarator)) {
processEntireDeclr = false;
......@@ -1077,7 +1077,7 @@ bool CheckSymbols::visit(FunctionDefinitionAST *ast)
void CheckSymbols::addUse(NameAST *ast, Kind kind)
{
if (! ast)
if (!ast)
return;
if (QualifiedNameAST *q = ast->asQualifiedName())
......@@ -1085,7 +1085,7 @@ void CheckSymbols::addUse(NameAST *ast, Kind kind)
if (DestructorNameAST *dtor = ast->asDestructorName())
ast = dtor->unqualified_name;
if (! ast)
if (!ast)
return; // nothing to do
else if (ast->asOperatorFunctionId() != 0 || ast->asConversionFunctionId() != 0)
return; // nothing to do
......@@ -1100,7 +1100,7 @@ void CheckSymbols::addUse(NameAST *ast, Kind kind)
void CheckSymbols::addUse(unsigned tokenIndex, Kind kind)
{
if (! tokenIndex)
if (!tokenIndex)
return;
const Token &tok = tokenAt(tokenIndex);
......@@ -1120,7 +1120,7 @@ void CheckSymbols::addUse(const Result &use)
if (use.isInvalid())
return;
if (! enclosingFunctionDefinition()) {
if (!enclosingFunctionDefinition()) {
if (_usages.size() >= _chunkSize) {
if (use.line > _lineOfLastUsage)
flush();
......@@ -1137,7 +1137,7 @@ void CheckSymbols::addUse(const Result &use)
void CheckSymbols::addType(ClassOrNamespace *b, NameAST *ast)
{
unsigned startToken;
if (! b || !acceptName(ast, &startToken))
if (!b || !acceptName(ast, &startToken))
return;
const Token &tok = tokenAt(startToken);
......@@ -1218,11 +1218,11 @@ bool CheckSymbols::maybeAddField(const QList<LookupItem> &candidates, NameAST *a
foreach (const LookupItem &r, candidates) {
Symbol *c = r.declaration();
if (! c)
if (!c)
continue;
else if (! c->isDeclaration())
else if (!c->isDeclaration())
return false;
else if (! (c->enclosingScope() && c->enclosingScope()->isClass()))
else if (!(c->enclosingScope() && c->enclosingScope()->isClass()))
return false; // shadowed
else if (c->isTypedef() || (c->type() && c->type()->isFunctionType()))
return false; // shadowed
......@@ -1261,7 +1261,7 @@ bool CheckSymbols::maybeAddFunction(const QList<LookupItem> &candidates, NameAST
Symbol *c = r.declaration();
// Skip current if there's no declaration or name.
if (! c || !c->name())
if (!c || !c->name())
continue;
// In addition check for destructors, since the leading ~ is not taken into consideration.
......@@ -1272,13 +1272,13 @@ bool CheckSymbols::maybeAddFunction(const QList<LookupItem> &candidates, NameAST
isConstructor = isConstructorDeclaration(c);
Function *funTy = c->type()->asFunctionType();
if (! funTy) {
if (!funTy) {
//Try to find a template function
if (Template * t = r.type()->asTemplateType())
if ((c = t->declaration()))
funTy = c->type()->asFunctionType();
}
if (! funTy)
if (!funTy)
continue; // TODO: add diagnostic messages and color call-operators calls too?
if (argumentCount < funTy->minimumArgumentCount()) {
......@@ -1286,7 +1286,7 @@ bool CheckSymbols::maybeAddFunction(const QList<LookupItem> &candidates, NameAST
kind = funTy->isVirtual() ? CppHighlightingSupport::VirtualMethodUse : CppHighlightingSupport::FunctionUse;
matchType = Match_TooFewArgs;
}
} else if (argumentCount > funTy->argumentCount() && ! funTy->isVariadic()) {
} else if (argumentCount > funTy->argumentCount() && !funTy->isVariadic()) {
if (matchType != Match_Ok) {
matchType = Match_TooManyArgs;
kind = funTy->isVirtual() ? CppHighlightingSupport::VirtualMethodUse : CppHighlightingSupport::FunctionUse;
......
......@@ -210,7 +210,7 @@ static void configureOverviewWithCodeStyleSettings(CPlusPlus::Overview &overview
CPlusPlus::Overview CppCodeStyleSettings::currentProjectCodeStyleOverview()
{
ProjectExplorer::Project *project = ProjectExplorer::ProjectExplorerPlugin::currentProject();
if (! project)
if (!project)
return currentGlobalCodeStyleOverview();
ProjectExplorer::EditorConfiguration *editorConfiguration = project->editorConfiguration();
......
......@@ -1498,7 +1498,7 @@ void CppToolsPlugin::test_completion_typedef_of_type_and_decl_of_type_no_replace
QCOMPARE(completions.size(), 2);
QVERIFY(completions.contains(QLatin1String("S")));
QVERIFY(completions.contains(QLatin1String("m")));
QVERIFY(! replaceAccessOperator);
QVERIFY(!replaceAccessOperator);
}
void CppToolsPlugin::test_completion_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator()
......@@ -1524,7 +1524,7 @@ void CppToolsPlugin::test_completion_typedef_of_pointer_and_decl_of_pointer_no_r
QStringList completions = getCompletions(data, &replaceAccessOperator);
QCOMPARE(completions.size(), 0);
QVERIFY(! replaceAccessOperator);
QVERIFY(!replaceAccessOperator);
}
void CppToolsPlugin::test_completion_typedef_of_type_and_decl_of_pointer_replace_access_operator()
......@@ -1636,7 +1636,7 @@ void CppToolsPlugin::test_completion_predecl_typedef_of_type_and_decl_type_no_re
QCOMPARE(completions.size(), 2);
QVERIFY(completions.contains(QLatin1String("S")));
QVERIFY(completions.contains(QLatin1String("m")));
QVERIFY(! replaceAccessOperator);
QVERIFY(!replaceAccessOperator);
}
void CppToolsPlugin::test_completion_predecl_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator()
......@@ -1662,7 +1662,7 @@ void CppToolsPlugin::test_completion_predecl_typedef_of_pointer_and_decl_of_poin
QStringList completions = getCompletions(data, &replaceAccessOperator);
QCOMPARE(completions.size(), 0);
QVERIFY(! replaceAccessOperator);
QVERIFY(!replaceAccessOperator);
}
void CppToolsPlugin::test_completion_predecl_typedef_of_pointer_and_decl_of_type_replace_access_operator()
......
......@@ -105,7 +105,7 @@ public:
if (Document::Ptr previousDoc = snapshot.document(fileName)) {
Control *control = previousDoc->control();
if (! control->findIdentifier(symbolId->chars(), symbolId->size()))
if (!control->findIdentifier(symbolId->chars(), symbolId->size()))
return usages; // skip this document, it's not using symbolId.
}
Document::Ptr doc;
......@@ -188,8 +188,11 @@ static void find_helper(QFutureInterface<Usage> &future,
const QString sourceFile = QString::fromUtf8(symbol->fileName(), symbol->fileNameLength());
QStringList files(sourceFile);
if (symbol->isClass() || symbol->isForwardClassDeclaration() || (symbol->enclosingScope() && ! symbol->isStatic() &&
symbol->enclosingScope()->isNamespace())) {
if (symbol->isClass()
|| symbol->isForwardClassDeclaration()
|| (symbol->enclosingScope()
&& !symbol->isStatic()
&& symbol->enclosingScope()->isNamespace())) {
foreach (const Document::Ptr &doc, context.snapshot()) {
if (doc->fileName() == sourceFile)
continue;
......
......@@ -84,7 +84,7 @@ protected:
if (Symbol *member = scope->memberAt(i)) {
if (member->isTypedef())
continue;
if (! member->isGenerated() && (member->isDeclaration() || member->isArgument())) {
if (!member->isGenerated() && (member->isDeclaration() || member->isArgument())) {
if (member->name() && member->name()->isNameId()) {
const Identifier *id = member->identifier();
unsigned line, column;
......
......@@ -150,7 +150,7 @@ QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locato
QVariant id = qVariantFromValue(info);
Locator::FilterEntry filterEntry(this, info.symbolName, id, info.icon);
if (! info.symbolType.isEmpty()) {
if (!info.symbolType.isEmpty()) {
filterEntry.extraInfo = info.symbolType;
} else {
filterEntry.extraInfo = FileUtils::shortNativePath(
......
......@@ -181,7 +181,7 @@ void CppModelManager::updateModifiedSourceFiles()
foreach (const Document::Ptr doc, snapshot) {
const QDateTime lastModified = doc->lastModified();
if (! lastModified.isNull()) {
if (!lastModified.isNull()) {
QFileInfo fileInfo(doc->fileName());
if (fileInfo.exists() && fileInfo.lastModified() != lastModified)
......@@ -293,7 +293,7 @@ bool CppModelManager::replaceDocument(Document::Ptr newDoc)
void CppModelManager::ensureUpdated()
{
QMutexLocker locker(&m_projectMutex);
if (! m_dirty)
if (!m_dirty)
return;
m_projectFiles = internalProjectFiles();
......@@ -552,7 +552,7 @@ void CppModelManager::updateProjectInfo(const ProjectInfo &pinfo)
{ // only hold the mutex for a limited scope, so the dumping afterwards can aquire it without deadlocking.
QMutexLocker locker(&m_projectMutex);
if (! pinfo.isValid())
if (!pinfo.isValid())
return;
ProjectExplorer::Project *project = pinfo.project().data();
......@@ -691,7 +691,7 @@ void CppModelManager::GC()
QSet<QString> processed;
QStringList todo = projectFiles();
while (! todo.isEmpty()) {
while (!todo.isEmpty()) {
QString fn = todo.last();
todo.removeLast();
......
......@@ -141,7 +141,7 @@ const QString CppModelManagerInterface::configurationFileName()
CppModelManagerInterface::CppModelManagerInterface(QObject *parent)
: QObject(parent)
{
Q_ASSERT(! g_instance);
Q_ASSERT(!g_instance);
g_instance = this;
}
......
......@@ -134,10 +134,10 @@ public:
{ }
operator bool() const
{ return ! m_project.isNull(); }
{ return !m_project.isNull(); }
bool isValid() const
{ return ! m_project.isNull(); }
{ return !m_project.isNull(); }
bool isNull() const
{ return m_project.isNull(); }
......
......@@ -76,7 +76,7 @@ static unsigned firstTypeSpecifierWithoutFollowingAttribute(
SpecifierListAST *list, TranslationUnit *translationUnit, unsigned endToken, bool *found)
{
*found = false;
if (! list || ! translationUnit || ! endToken)
if (!list || !translationUnit || !endToken)
return 0;
for (SpecifierListAST *it = list; it; it = it->next) {
......@@ -156,7 +156,7 @@ bool PointerDeclarationFormatter::visit(SimpleDeclarationAST *ast)
// characters from the beginning since our rewritten declaration
// will contain all type specifiers.
int charactersToRemove = 0;
if (! isFirstDeclarator) {
if (!isFirstDeclarator) {
const int startAST = m_cppRefactoringFile->startOf(ast);
const int startFirstDeclarator = m_cppRefactoringFile->startOf(firstDeclarator);
CHECK_RV(startAST < startFirstDeclarator, "No specifier", true);
......@@ -188,8 +188,8 @@ bool PointerDeclarationFormatter::visit(SimpleDeclarationAST *ast)
m_cppRefactoringFile->cppDocument()->translationUnit(),
lastActivationToken,
&foundBegin);
if (! foundBegin) {
CHECK_RV(! isFirstDeclarator, "Declaration without attributes not supported", true);
if (!foundBegin) {
CHECK_RV(!isFirstDeclarator, "Declaration without attributes not supported", true);
firstActivationToken = declarator->firstToken();
}
......@@ -380,7 +380,7 @@ void PointerDeclarationFormatter::checkAndRewrite(DeclaratorAST *declarator,
// Check for expanded tokens
for (unsigned token = tokenRange.start; token <= tokenRange.end; ++token)
CHECK_R(! tokenAt(token).expanded(), "Token is expanded");
CHECK_R(!tokenAt(token).expanded(), "Token is expanded");
Range range(m_cppRefactoringFile->startOf(tokenRange.start),
m_cppRefactoringFile->endOf(tokenRange.end));
......
......@@ -255,7 +255,7 @@ QString CppPreprocessor::resolveFile_helper(const QString &fileName, IncludeType
void CppPreprocessor::macroAdded(const Macro &macro)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
m_currentDoc->appendMacro(macro);
......@@ -271,7 +271,7 @@ static inline const Macro revision(const CppModelManagerInterface::WorkingCopy &
void CppPreprocessor::passedMacroDefinitionCheck(unsigned offset, unsigned line, const Macro &macro)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
m_currentDoc->addMacroUse(revision(m_workingCopy, macro), offset, macro.name().length(), line,
......@@ -280,7 +280,7 @@ void CppPreprocessor::passedMacroDefinitionCheck(unsigned offset, unsigned line,
void CppPreprocessor::failedMacroDefinitionCheck(unsigned offset, const ByteArrayRef &name)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
m_currentDoc->addUndefinedMacroUse(QByteArray(name.start(), name.size()), offset);
......@@ -288,7 +288,7 @@ void CppPreprocessor::failedMacroDefinitionCheck(unsigned offset, const ByteArra
void CppPreprocessor::notifyMacroReference(unsigned offset, unsigned line, const Macro &macro)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
m_currentDoc->addMacroUse(revision(m_workingCopy, macro), offset, macro.name().length(), line,
......@@ -299,7 +299,7 @@ void CppPreprocessor::startExpandingMacro(unsigned offset, unsigned line,
const Macro &macro,
const QVector<MacroArgumentReference> &actuals)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
m_currentDoc->addMacroUse(revision(m_workingCopy, macro), offset, macro.name().length(), line,
......@@ -308,7 +308,7 @@ void CppPreprocessor::startExpandingMacro(unsigned offset, unsigned line,
void CppPreprocessor::stopExpandingMacro(unsigned, const Macro &)
{
if (! m_currentDoc)
if (!m_currentDoc)
return;
}
......@@ -322,7 +322,7 @@ void CppPreprocessor::markAsIncludeGuard(const QByteArray &macroName)
void CppPreprocessor::mergeEnvironment(Document::Ptr doc)
{
if (! doc)
if (!doc)
return;
const QString fn = doc->fileName();
......@@ -374,7 +374,7 @@ void CppPreprocessor::sourceNeeded(unsigned line, const QString &fileName, Inclu
QString contents;
getFileContents(absoluteFileName, &contents, &editorRevision);
if (m_currentDoc) {
if (contents.isEmpty() && ! QFileInfo(absoluteFileName).isAbsolute()) {
if (contents.isEmpty() && !QFileInfo(absoluteFileName).isAbsolute()) {
QString msg = QCoreApplication::translate(
"CppPreprocessor", "%1: No such file or directory").arg(fileName);
......
......@@ -276,7 +276,7 @@ void CppEditorSupport::onDocumentUpdated(Document::Ptr doc)
}
// update semantic info in a future
if (! m_initialized ||
if (!m_initialized ||
(m_textEditor->widget()->isVisible()
&& (m_lastSemanticInfo.doc.isNull()
|| m_lastSemanticInfo.doc->translationUnit()->ast() == 0
......@@ -373,7 +373,7 @@ void CppEditorSupport::onDiagnosticsChanged()
c.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, m.length());
} else {
for (int i = 0; i < text.size(); ++i) {
if (! text.at(i).isSpace()) {
if (!text.at(i).isSpace()) {
c.setPosition(c.position() + i);
break;
}
......
......@@ -106,13 +106,13 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
QString declFile = QString::fromUtf8(declaration->fileName(), declaration->fileNameLength());
Document::Ptr thisDocument = snapshot.document(declFile);
if (! thisDocument) {
if (!thisDocument) {
qWarning() << "undefined document:" << declaration->fileName();
return 0;
}
Function *declarationTy = declaration->type()->asFunctionType();
if (! declarationTy) {
if (!declarationTy) {
qWarning() << "not a function:" << declaration->fileName()
<< declaration->line() << declaration->column();
return 0;
......@@ -126,7 +126,7 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
}
const Identifier *id = declaration->identifier();
if (id && ! doc->control()->findIdentifier(id->chars(), id->size()))
if (id && !doc->control()->findIdentifier(id->chars(), id->size()))
continue;
if (!id) {
......@@ -143,13 +143,13 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
candidates.accept(doc->globalNamespace());
const QList<Function *> result = candidates.result();
if (! result.isEmpty()) {
if (!result.isEmpty()) {
LookupContext context(doc, snapshot);
QList<Function *> viableFunctions;
ClassOrNamespace *enclosingType = context.lookupType(declaration);
if (! enclosingType)
if (!enclosingType)
continue; // nothing to do
foreach (Function *fun, result) {
......@@ -168,16 +168,18 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
if (viableFunctions.isEmpty())
continue;
else if (! strict && viableFunctions.length() == 1)
else if (!strict && viableFunctions.length() == 1)
return viableFunctions.first();
Function *best = 0;
foreach (Function *fun, viableFunctions) {
if (! (fun->unqualifiedName() && fun->unqualifiedName()->isEqualTo(declaration->unqualifiedName())))
if (!(fun->unqualifiedName()
&& fun->unqualifiedName()->isEqualTo(declaration->unqualifiedName()))) {
continue;
}
if (fun->argumentCount() == declarationTy->argumentCount()) {
if (! strict && ! best)
if (!strict && !best)
best = fun;
const unsigned argc = declarationTy->argumentCount();
......@@ -185,7 +187,7 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
for (; argIt < argc; ++argIt) {
Symbol *arg = fun->argumentAt(argIt);
Symbol *otherArg = declarationTy->argumentAt(argIt);
if (! arg->type().isEqualTo(otherArg->type()))
if (!arg->type().isEqualTo(otherArg->type()))
break;
}
......@@ -197,10 +199,10 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,
}
}
if (strict && ! best)
if (strict && !best)
continue;
if (! best)
if (!best)
best = viableFunctions.first();
return best;
}
......@@ -211,7 +213,7 @@ Function *SymbolFinder::findMatchingDefinition(Symbol *declaration,