diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-11 01:55:07 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-11 01:55:07 +0000 |
commit | c789882a294d29b3e5450a972ad67c4839c75e23 (patch) | |
tree | 4234880ff76df9da2caaf06983da144e42032a09 /netwerk/protocol/file | |
parent | 93eee35e84c29e1e64cb1531a0830b8ab2a7c5fa (diff) | |
parent | f9ad6258221d89d8ee8e543c2ff8b21a42dbd285 (diff) | |
download | uxp-c789882a294d29b3e5450a972ad67c4839c75e23.tar.gz |
Merge pull request 'Replace MOZ_MUST_USE with [[nodiscard]]' (#2375) from 2342-nodiscard-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2375
Diffstat (limited to 'netwerk/protocol/file')
-rw-r--r-- | netwerk/protocol/file/nsFileChannel.h | 12 | ||||
-rw-r--r-- | netwerk/protocol/file/nsFileProtocolHandler.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/netwerk/protocol/file/nsFileChannel.h b/netwerk/protocol/file/nsFileChannel.h index 4f28b9ed01..090b4bb403 100644 --- a/netwerk/protocol/file/nsFileChannel.h +++ b/netwerk/protocol/file/nsFileChannel.h @@ -28,13 +28,13 @@ protected: // method also returns a best guess at the content-type for the data stream. // NOTE: If the channel has a type hint set, contentType will be left // untouched. The caller should not use it in that case. - MOZ_MUST_USE nsresult MakeFileInputStream(nsIFile *file, - nsCOMPtr<nsIInputStream> &stream, - nsCString &contentType, bool async); + [[nodiscard]] nsresult MakeFileInputStream(nsIFile *file, + nsCOMPtr<nsIInputStream> &stream, + nsCString &contentType, bool async); - virtual MOZ_MUST_USE nsresult OpenContentStream(bool async, - nsIInputStream **result, - nsIChannel** channel) override; + [[nodiscard]] virtual nsresult OpenContentStream(bool async, + nsIInputStream **result, + nsIChannel** channel) override; private: nsCOMPtr<nsIInputStream> mUploadStream; diff --git a/netwerk/protocol/file/nsFileProtocolHandler.h b/netwerk/protocol/file/nsFileProtocolHandler.h index 211eb2873e..1da0713284 100644 --- a/netwerk/protocol/file/nsFileProtocolHandler.h +++ b/netwerk/protocol/file/nsFileProtocolHandler.h @@ -21,7 +21,7 @@ public: nsFileProtocolHandler(); - MOZ_MUST_USE nsresult Init(); + [[nodiscard]] nsresult Init(); }; #endif // !nsFileProtocolHandler_h__ |