From 0b919969cebeeb531a45dc4a95871cc279343281 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 22 Jan 2019 15:52:49 +0100 Subject: Inline various simple methods in QDoc Change-Id: Ie2ea694bd319f483e9a70f5934031028e0894976 Reviewed-by: Paul Wicking --- src/qdoc/codechunk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qdoc/codechunk.h') 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); } -- cgit v1.2.1