summaryrefslogtreecommitdiff
path: root/uriloader/exthandler/mac
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-11 01:55:07 +0000
committerMoonchild <moonchild@palemoon.org>2023-11-11 01:55:07 +0000
commitc789882a294d29b3e5450a972ad67c4839c75e23 (patch)
tree4234880ff76df9da2caaf06983da144e42032a09 /uriloader/exthandler/mac
parent93eee35e84c29e1e64cb1531a0830b8ab2a7c5fa (diff)
parentf9ad6258221d89d8ee8e543c2ff8b21a42dbd285 (diff)
downloaduxp-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 'uriloader/exthandler/mac')
-rw-r--r--uriloader/exthandler/mac/nsDecodeAppleFile.h2
-rw-r--r--uriloader/exthandler/mac/nsMIMEInfoMac.h8
-rw-r--r--uriloader/exthandler/mac/nsOSHelperAppService.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/uriloader/exthandler/mac/nsDecodeAppleFile.h b/uriloader/exthandler/mac/nsDecodeAppleFile.h
index cea2d701ec..8433b533af 100644
--- a/uriloader/exthandler/mac/nsDecodeAppleFile.h
+++ b/uriloader/exthandler/mac/nsDecodeAppleFile.h
@@ -83,7 +83,7 @@ public:
nsDecodeAppleFile();
virtual ~nsDecodeAppleFile();
- MOZ_MUST_USE nsresult Initialize(nsIOutputStream *output, nsIFile *file);
+ [[nodiscard]] nsresult Initialize(nsIOutputStream *output, nsIFile *file);
private:
#define MAX_BUFFERSIZE 1024
diff --git a/uriloader/exthandler/mac/nsMIMEInfoMac.h b/uriloader/exthandler/mac/nsMIMEInfoMac.h
index 298357f757..d301234c87 100644
--- a/uriloader/exthandler/mac/nsMIMEInfoMac.h
+++ b/uriloader/exthandler/mac/nsMIMEInfoMac.h
@@ -16,15 +16,15 @@ class nsMIMEInfoMac : public nsMIMEInfoImpl {
NS_IMETHOD LaunchWithFile(nsIFile* aFile);
protected:
- virtual MOZ_MUST_USE nsresult LoadUriInternal(nsIURI *aURI);
+ [[nodiscard]] virtual nsresult LoadUriInternal(nsIURI *aURI);
#ifdef DEBUG
- virtual MOZ_MUST_USE nsresult LaunchDefaultWithFile(nsIFile* aFile) {
+ [[nodiscard]] virtual nsresult LaunchDefaultWithFile(nsIFile* aFile) {
NS_NOTREACHED("do not call this method, use LaunchWithFile");
return NS_ERROR_UNEXPECTED;
}
#endif
- static MOZ_MUST_USE nsresult OpenApplicationWithURI(nsIFile *aApplication,
- const nsCString& aURI);
+ [[nodiscard]] static nsresult OpenApplicationWithURI(nsIFile *aApplication,
+ const nsCString& aURI);
NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription);
diff --git a/uriloader/exthandler/mac/nsOSHelperAppService.h b/uriloader/exthandler/mac/nsOSHelperAppService.h
index 7371e1f42d..05e71d4b1b 100644
--- a/uriloader/exthandler/mac/nsOSHelperAppService.h
+++ b/uriloader/exthandler/mac/nsOSHelperAppService.h
@@ -36,10 +36,10 @@ public:
// platformAppPath --> a platform specific path to an application that we got out of the
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
// aFile --> an nsIFile representation of that platform application path.
- virtual MOZ_MUST_USE nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
+ [[nodiscard]] virtual nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
- MOZ_MUST_USE nsresult OSProtocolHandlerExists(const char * aScheme,
- bool * aHandlerExists);
+ [[nodiscard]] nsresult OSProtocolHandlerExists(const char * aScheme,
+ bool * aHandlerExists);
private:
uint32_t mPermissions;