From 0cfefdfd4221e043317b7838ca050cb853621e69 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 3 Nov 2023 12:17:29 +0100 Subject: Issue #2342: Use [[nodiscard]] in /accessible and /caps --- accessible/ipc/DocAccessibleParent.h | 2 +- accessible/windows/msaa/AccessibleWrap.h | 4 ++-- caps/BasePrincipal.h | 6 +++--- 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& aNewTree, uint32_t aIdx, uint32_t aIdxInParent); - MOZ_MUST_USE bool CheckDocTree() const; + [[nodiscard]] bool CheckDocTree() const; xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy); nsTArray 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 + [[nodiscard]] already_AddRefed 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 + [[nodiscard]] already_AddRefed 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. -- cgit v1.2.3