summaryrefslogtreecommitdiff
path: root/src/qdoc/codechunk.h
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-03-18 14:27:27 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-03-18 14:27:27 +0100
commitd9a3e03934076aea8852f1c4b142a5ecfeea0297 (patch)
tree6832178b5dddb8bf4dc61590265a638133f8bcfd /src/qdoc/codechunk.h
parent4c0ba237eabf66e028459e86620c448c4e21760a (diff)
parent64221433d7a82955b111e20178c9527cb0373914 (diff)
downloadqttools-d9a3e03934076aea8852f1c4b142a5ecfeea0297.tar.gz
Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts: dependencies.yaml Change-Id: Ia86822a3b64be4e17d525f6b055eadfab7215bc8
Diffstat (limited to 'src/qdoc/codechunk.h')
-rw-r--r--src/qdoc/codechunk.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/qdoc/codechunk.h b/src/qdoc/codechunk.h
index b7cda1324..0ccc26304 100644
--- a/src/qdoc/codechunk.h
+++ b/src/qdoc/codechunk.h
@@ -46,7 +46,11 @@ public:
CodeChunk(const QString &str) : s(str), hotspot(-1) {}
void append(const QString &lexeme);
- void appendHotspot() { if (hotspot == -1) hotspot = s.length(); }
+ void appendHotspot()
+ {
+ if (hotspot == -1)
+ hotspot = s.length();
+ }
bool isEmpty() const { return s.isEmpty(); }
void clear() { s.clear(); }
@@ -60,27 +64,33 @@ private:
int hotspot;
};
-inline bool operator==(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator==(const CodeChunk &c, const CodeChunk &d)
+{
return c.toString() == d.toString();
}
-inline bool operator!=(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator!=(const CodeChunk &c, const CodeChunk &d)
+{
return !(c == d);
}
-inline bool operator<(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator<(const CodeChunk &c, const CodeChunk &d)
+{
return c.toString() < d.toString();
}
-inline bool operator>(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator>(const CodeChunk &c, const CodeChunk &d)
+{
return d < c;
}
-inline bool operator<=(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator<=(const CodeChunk &c, const CodeChunk &d)
+{
return !(c > d);
}
-inline bool operator>=(const CodeChunk& c, const CodeChunk& d) {
+inline bool operator>=(const CodeChunk &c, const CodeChunk &d)
+{
return !(c < d);
}