forked from qt-creator/qt-creator
Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -131,7 +131,7 @@ CppTools::CheckSymbols *createHighlighter(const CPlusPlus::Document::Ptr &doc,
|
||||
|
||||
// Filter out C++ keywords
|
||||
const Tokens tokens = tokenize(name);
|
||||
if (tokens.length() && (tokens.at(0).isKeyword() || tokens.at(0).isObjCAtKeyword()))
|
||||
if (!tokens.isEmpty() && (tokens.at(0).isKeyword() || tokens.at(0).isObjCAtKeyword()))
|
||||
continue;
|
||||
|
||||
int line, column;
|
||||
|
||||
@@ -165,7 +165,7 @@ void HeaderPathFilter::tweakHeaderPaths()
|
||||
|
||||
void HeaderPathFilter::addPreIncludesPath()
|
||||
{
|
||||
if (projectDirectory.size()) {
|
||||
if (!projectDirectory.isEmpty()) {
|
||||
const Utils::FilePath rootProjectDirectory = Utils::FilePath::fromString(projectDirectory)
|
||||
.pathAppended(".pre_includes");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user