summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-03 12:17:29 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-08 13:45:38 +0100
commit0cfefdfd4221e043317b7838ca050cb853621e69 (patch)
tree5182cdc512f4ff1b6948cd1a60fcc2d7e6cb29c5
parentad321f50d91937a319f29ebab89b9509acc9b51e (diff)
downloaduxp-0cfefdfd4221e043317b7838ca050cb853621e69.tar.gz
Issue #2342: Use [[nodiscard]] in /accessible and /caps
-rw-r--r--accessible/ipc/DocAccessibleParent.h2
-rw-r--r--accessible/windows/msaa/AccessibleWrap.h4
-rw-r--r--caps/BasePrincipal.h6
3 files changed, 6 insertions, 6 deletions
diff --git a/accessible/ipc/DocAccessibleParent.h b/accessible/ipc/DocAccessibleParent.h
index ba56c33d0c..5ffbe73d23 100644
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -176,7 +176,7 @@ private:
uint32_t AddSubtree(ProxyAccessible* aParent,
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
uint32_t aIdxInParent);
- MOZ_MUST_USE bool CheckDocTree() const;
+ [[nodiscard]] bool CheckDocTree() const;
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
nsTArray<DocAccessibleParent*> mChildDocs;
diff --git a/accessible/windows/msaa/AccessibleWrap.h b/accessible/windows/msaa/AccessibleWrap.h
index 433c37d73f..59e8e511b3 100644
--- a/accessible/windows/msaa/AccessibleWrap.h
+++ b/accessible/windows/msaa/AccessibleWrap.h
@@ -173,7 +173,7 @@ public: // construction, destruction
/**
* Find an accessible by the given child ID in cached documents.
*/
- MOZ_MUST_USE already_AddRefed<IAccessible>
+ [[nodiscard]] already_AddRefed<IAccessible>
GetIAccessibleFor(const VARIANT& aVarChild, bool* aIsDefunct);
virtual void GetNativeInterface(void **aOutAccessible) override;
@@ -198,7 +198,7 @@ protected:
/**
* Find a remote accessible by the given child ID.
*/
- MOZ_MUST_USE already_AddRefed<IAccessible>
+ [[nodiscard]] already_AddRefed<IAccessible>
GetRemoteIAccessibleFor(const VARIANT& aVarChild);
/**
diff --git a/caps/BasePrincipal.h b/caps/BasePrincipal.h
index b1f151521f..6aa8243e00 100644
--- a/caps/BasePrincipal.h
+++ b/caps/BasePrincipal.h
@@ -51,12 +51,12 @@ public:
// Don't use this method for anything else than debugging!
void CreateAnonymizedSuffix(nsACString& aStr) const;
- MOZ_MUST_USE bool PopulateFromSuffix(const nsACString& aStr);
+ [[nodiscard]] bool PopulateFromSuffix(const nsACString& aStr);
// Populates the attributes from a string like
// |uri!key1=value1&key2=value2| and returns the uri without the suffix.
- MOZ_MUST_USE bool PopulateFromOrigin(const nsACString& aOrigin,
- nsACString& aOriginNoSuffix);
+ [[nodiscard]] bool PopulateFromOrigin(const nsACString& aOrigin,
+ nsACString& aOriginNoSuffix);
// Helper function to match mIsPrivateBrowsing to existing private browsing
// flags. Once all other flags are removed, this can be removed too.