CPlusPlus: Inline more simple Type related functions

Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-06-24 16:45:12 +02:00
parent 27d51e9804
commit e2bb204d4d
26 changed files with 180 additions and 469 deletions

View File

@@ -315,7 +315,7 @@ private:
return Usage::Type::Other;
if (const auto refType = type->asReferenceType())
return refType->elementType().isConst() ? Usage::Type::Read : Usage::Type::WritableRef;
while (type->isPointerType()) {
while (type->asPointerType()) {
type = type->asPointerType()->elementType();
if (!type.isConst())
return Usage::Type::WritableRef;
@@ -434,7 +434,7 @@ private:
if (items.isEmpty())
return Usage::Type::Other;
for (const LookupItem &item : qAsConst(items)) {
if (item.type()->isFunctionType()) {
if (item.type()->asFunctionType()) {
if (item.type().isConst())
return Usage::Type::Read;
if (item.type().isStatic())