diff options
author | Marcus Hoffmann <bubu@bubu1.eu> | 2021-12-03 01:34:34 +0100 |
---|---|---|
committer | Marcus Hoffmann <bubu@bubu1.eu> | 2021-12-03 01:37:00 +0100 |
commit | a9d8059fb26920402da346f9319dfd1eb117f875 (patch) | |
tree | 99aa6a3a759025e7324fced0a9bdd0932d191125 /src/timeline | |
parent | InputBar: mark constrictor as explicit (diff) | |
download | nheko-a9d8059fb26920402da346f9319dfd1eb117f875.tar.xz |
InputBar: Mark some functions as [[nodiscard]]
This warns when you the return value of those functions isn't used. Suggested-by: Clang-Tidy: Function X should be marked [[nodiscard]]
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/InputBar.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timeline/InputBar.h b/src/timeline/InputBar.h index 399dd116..78f16139 100644 --- a/src/timeline/InputBar.h +++ b/src/timeline/InputBar.h @@ -45,19 +45,19 @@ public: } public slots: - QString text() const; + [[nodiscard]] QString text() const; QString previousText(); QString nextText(); void setText(const QString& newText); - bool containsAtRoom() const { return containsAtRoom_; } + [[nodiscard]] bool containsAtRoom() const { return containsAtRoom_; } void send(); void paste(bool fromMouse); void insertMimeData(const QMimeData *data); void updateState(int selectionStart, int selectionEnd, int cursorPosition, const QString& text); void openFileSelection(); - bool uploading() const { return uploading_; } + [[nodiscard]] bool uploading() const { return uploading_; } void message(const QString& body, MarkdownOverride useMarkdown = MarkdownOverride::NOT_SPECIFIED, bool rainbowify = false); |