aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmldom/qqmldomcomments_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-12-13 15:24:34 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-12-15 10:22:30 +0100
commitf86900fa79dee56db1c0694495a52069b81457c4 (patch)
tree0d070ff23746edea06064bbe345649d2328a47ee /src/qmldom/qqmldomcomments_p.h
parent0a0c1c13487cc09e2391f24ccaed51a43dd9db19 (diff)
QmlDom: Pass arguments by const ref, next round
In some of those places we could move instead, but let's first get the basics right. Coverity-Id: 433005 Coverity-Id: 433004 Coverity-Id: 433003 Coverity-Id: 433001 Coverity-Id: 432999 Coverity-Id: 432998 Coverity-Id: 432997 Coverity-Id: 432996 Coverity-Id: 432995 Coverity-Id: 432993 Coverity-Id: 432992 Coverity-Id: 432991 Coverity-Id: 432989 Coverity-Id: 432988 Change-Id: I90680511aec16fdd05b632dbdfa44d3cac1d09d0 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmldom/qqmldomcomments_p.h')
-rw-r--r--src/qmldom/qqmldomcomments_p.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmldom/qqmldomcomments_p.h b/src/qmldom/qqmldomcomments_p.h
index 085a537142..0e8089ee24 100644
--- a/src/qmldom/qqmldomcomments_p.h
+++ b/src/qmldom/qqmldomcomments_p.h
@@ -74,7 +74,7 @@ public:
constexpr static DomType kindValue = DomType::Comment;
DomType kind() const { return kindValue; }
- Comment(QString c, int newlinesBefore = 1)
+ Comment(const QString &c, int newlinesBefore = 1)
: m_commentStr(c), m_comment(m_commentStr), m_newlinesBefore(newlinesBefore)
{
}
@@ -187,10 +187,10 @@ public:
Path canonicalPath(const DomItem &self) const override { return self.m_ownerPath; }
static void collectComments(MutableDomItem &item);
static void collectComments(
- std::shared_ptr<Engine> engine, AST::Node *n,
- std::shared_ptr<AstComments> collectComments, const MutableDomItem &rootItem,
- FileLocations::Tree rootItemLocations);
- AstComments(std::shared_ptr<Engine> e) : m_engine(e) { }
+ const std::shared_ptr<Engine> &engine, AST::Node *n,
+ const std::shared_ptr<AstComments> &collectComments, const MutableDomItem &rootItem,
+ const FileLocations::Tree &rootItemLocations);
+ AstComments(const std::shared_ptr<Engine> &e) : m_engine(e) { }
AstComments(const AstComments &o)
: OwningItem(o), m_engine(o.m_engine), m_commentedElements(o.m_commentedElements)
{