diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-12-19 18:56:48 +0100 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2020-01-06 06:17:04 +0100 |
commit | a18457ab5310b60290b4655f51aec859e7b3bc8a (patch) | |
tree | 4f085e503c35238cd007e2aed0808a7ba9fc8470 /src/qdoc/doc.cpp | |
parent | 3c2523b24220aefa4f3335f11fd8eb7993f29160 (diff) |
QDoc: clean up ctor/dtor in Atom
* Make calling code specify Atom type, remove superfluous ctor.
* Move default initialization from initialization list to in-class
for member that initializes the same in all ctors.
* Move initialization from ctor body to initialization list.
* Mark trivial dtor default.
Change-Id: I5e4a9e5cdcf0b9f3ba68b53dcab34c2ab77b415d
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/doc.cpp')
-rw-r--r-- | src/qdoc/doc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp index 0d5d059d6..89748b0ad 100644 --- a/src/qdoc/doc.cpp +++ b/src/qdoc/doc.cpp @@ -1860,7 +1860,7 @@ void DocParser::append(const QString &string) Atom::AtomType lastType = priv->text.lastAtom()->type(); if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n"))) priv->text.lastAtom()->chopString(); - priv->text << Atom(string); // The Atom type is Link. + priv->text << Atom(Atom::Link, string); } void DocParser::append(Atom::AtomType type, const QString &p1, const QString &p2) @@ -1877,7 +1877,7 @@ void DocParser::append(const QString &p1, const QString &p2) if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n"))) priv->text.lastAtom()->chopString(); if (p2.isEmpty()) - priv->text << Atom(p1); // The Atom type is Link. + priv->text << Atom(Atom::Link, p1); else priv->text << LinkAtom(p1, p2); } |