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

Designer: Pass strings by reference



Change-Id: I86395393f5b79a2ade99e4422453bec5395d2898
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent b3a56046
...@@ -95,7 +95,7 @@ private: ...@@ -95,7 +95,7 @@ private:
class DocumentContainsDeclaration: protected SymbolVisitor class DocumentContainsDeclaration: protected SymbolVisitor
{ {
public: public:
bool operator()(Scope *scope, const QString function) bool operator()(Scope *scope, const QString &function)
{ {
if (!scope) if (!scope)
return false; return false;
...@@ -139,13 +139,13 @@ private: ...@@ -139,13 +139,13 @@ private:
Overview m_overview; Overview m_overview;
}; };
bool documentContainsFunctionDefinition(const Document::Ptr &document, const QString function) bool documentContainsFunctionDefinition(const Document::Ptr &document, const QString &function)
{ {
return DocumentContainsFunctionDefinition()(document->globalNamespace(), function); return DocumentContainsFunctionDefinition()(document->globalNamespace(), function);
} }
bool documentContainsMemberFunctionDeclaration(const Document::Ptr &document, bool documentContainsMemberFunctionDeclaration(const Document::Ptr &document,
const QString declaration) const QString &declaration)
{ {
return DocumentContainsDeclaration()(document->globalNamespace(), declaration); return DocumentContainsDeclaration()(document->globalNamespace(), declaration);
} }
......
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