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:
@@ -1100,7 +1100,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name,
|
||||
// for "using" we should use the real one ClassOrNamespace(it should be the first
|
||||
// one item from usings list)
|
||||
// we indicate that it is a 'using' by checking number of symbols(it should be 0)
|
||||
if (reference->symbols().count() == 0 && reference->usings().count() != 0)
|
||||
if (reference->symbols().isEmpty() && !reference->usings().isEmpty())
|
||||
reference = reference->_usings[0];
|
||||
|
||||
// if it is a TemplateNameId it could be a specialization(full or partial) or
|
||||
|
||||
@@ -335,7 +335,7 @@ void TypePrettyPrinter::prependSpaceAfterIndirection(bool hasName)
|
||||
const bool case2 = ! hasCvSpecifier && spaceBeforeNameNeeded;
|
||||
// case 3: In "char *argv[]", put a space between '*' and "argv" when requested
|
||||
const bool case3 = ! hasCvSpecifier && ! shouldBindToIdentifier
|
||||
&& ! _isIndirectionToArrayOrFunction && _text.size() && _text.at(0).isLetter();
|
||||
&& ! _isIndirectionToArrayOrFunction && !_text.isEmpty() && _text.at(0).isLetter();
|
||||
if (case1 || case2 || case3)
|
||||
_text.prepend(QLatin1Char(' '));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user