forked from qt-creator/qt-creator
C++: Pass some values by reference
Change-Id: If2829e9ec5f796714bf3906c17c4c654cdfc4dea Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
589535c120
commit
e23dbb4c65
@@ -82,7 +82,7 @@ QString CPlusPlus::toString(const Symbol *s, QString id)
|
||||
indent(toString(s->type())));
|
||||
}
|
||||
|
||||
QString CPlusPlus::toString(LookupItem it, QString id)
|
||||
QString CPlusPlus::toString(const LookupItem &it, const QString &id)
|
||||
{
|
||||
QString result = QString::fromLatin1("%1:").arg(id);
|
||||
if (it.declaration())
|
||||
@@ -114,7 +114,7 @@ void CPlusPlus::dump(const Name *name)
|
||||
qDebug() << qPrintable(toString(name));
|
||||
}
|
||||
|
||||
void CPlusPlus::dump(FullySpecifiedType ty)
|
||||
void CPlusPlus::dump(const FullySpecifiedType &ty)
|
||||
{
|
||||
qDebug() << qPrintable(toString(ty));
|
||||
}
|
||||
@@ -124,7 +124,7 @@ void CPlusPlus::dump(const Symbol *s)
|
||||
qDebug() << qPrintable(toString(s));
|
||||
}
|
||||
|
||||
void CPlusPlus::dump(LookupItem it)
|
||||
void CPlusPlus::dump(const LookupItem &it)
|
||||
{
|
||||
qDebug() << qPrintable(toString(it));
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace CPlusPlus {
|
||||
QString CPLUSPLUS_EXPORT toString(const Name *name, QString id = QLatin1String("Name"));
|
||||
QString CPLUSPLUS_EXPORT toString(FullySpecifiedType ty, QString id = QLatin1String("Type"));
|
||||
QString CPLUSPLUS_EXPORT toString(const Symbol *s, QString id = QLatin1String("Symbol"));
|
||||
QString CPLUSPLUS_EXPORT toString(LookupItem it, QString id = QLatin1String("LookupItem"));
|
||||
QString CPLUSPLUS_EXPORT toString(const LookupItem &it, const QString &id = QLatin1String("LookupItem"));
|
||||
QString CPLUSPLUS_EXPORT toString(const ClassOrNamespace *binding, QString id = QLatin1String("ClassOrNamespace"));
|
||||
|
||||
void CPLUSPLUS_EXPORT dump(const Name *name);
|
||||
void CPLUSPLUS_EXPORT dump(FullySpecifiedType ty);
|
||||
void CPLUSPLUS_EXPORT dump(const FullySpecifiedType &ty);
|
||||
void CPLUSPLUS_EXPORT dump(const Symbol *s);
|
||||
void CPLUSPLUS_EXPORT dump(LookupItem it);
|
||||
void CPLUSPLUS_EXPORT dump(const LookupItem &it);
|
||||
void CPLUSPLUS_EXPORT dump(const ClassOrNamespace *binding);
|
||||
|
||||
} // namespace CPlusPlus
|
||||
|
||||
Reference in New Issue
Block a user