summaryrefslogtreecommitdiff
path: root/src/qdoc/codechunk.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2019-01-22 15:52:49 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-01-23 15:42:44 +0000
commit0b919969cebeeb531a45dc4a95871cc279343281 (patch)
treec62d3b550383adc4b885c17914e30efa3426bdcb /src/qdoc/codechunk.h
parentf17ec3aac885cd347a3d3c6d74541a9aadc5fc78 (diff)
downloadqttools-0b919969cebeeb531a45dc4a95871cc279343281.tar.gz
Inline various simple methods in QDoc
Change-Id: Ie2ea694bd319f483e9a70f5934031028e0894976 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/codechunk.h')
-rw-r--r--src/qdoc/codechunk.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qdoc/codechunk.h b/src/qdoc/codechunk.h
index e7f103fa3..3889d2854 100644
--- a/src/qdoc/codechunk.h
+++ b/src/qdoc/codechunk.h
@@ -64,15 +64,15 @@ QT_BEGIN_NAMESPACE
class CodeChunk
{
public:
- CodeChunk();
- CodeChunk( const QString& str );
+ CodeChunk() : hotspot(-1) {}
+ CodeChunk(const QString& str) : s(str), hotspot(-1) {}
void append( const QString& lexeme );
- void appendHotspot();
+ void appendHotspot() { if (hotspot == -1) hotspot = s.length(); }
bool isEmpty() const { return s.isEmpty(); }
void clear() { s.clear(); }
- QString toString() const;
+ QString toString() const { return s; }
QStringList toPath() const;
QString left() const { return s.left(hotspot == -1 ? s.length() : hotspot); }
QString right() const { return s.mid(hotspot == -1 ? s.length() : hotspot); }