Commit e23dbb4c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

C++: Pass some values by reference



Change-Id: If2829e9ec5f796714bf3906c17c4c654cdfc4dea
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 589535c1
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment