aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-01-08 16:29:02 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-01-10 21:20:13 +0100
commit728abd1dbce275b7778795f4588ef6588d0209da (patch)
treeb68fd2b45d568bbbd285d679fd911195523d7a2c /tools
parent0989e5a2b7036674be8d43fac35a686fd04896c5 (diff)
qmlformat: Fix default construction of Comment
m_location would be uninitialized. Change-Id: Ieeeb0c0783a0b8e6f919019bd2ddcc1752993eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlformat/commentastvisitor.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmlformat/commentastvisitor.h b/tools/qmlformat/commentastvisitor.h
index 1df907f8a3..369784a5ba 100644
--- a/tools/qmlformat/commentastvisitor.h
+++ b/tools/qmlformat/commentastvisitor.h
@@ -48,9 +48,9 @@ struct Comment
Back_Inline = Back << 1,
DefaultLocations = Front | Back_Inline,
AllLocations = Front | Back | Back_Inline
- } m_location;
+ } m_location = Front;
- Comment() {}
+ Comment() = default;
Comment(const QQmlJS::Engine *engine, Location location, QList<SourceLocation> srcLocations)
: m_location(location), m_srcLocations(srcLocations) {
for (const auto& srcLoc : srcLocations) {