summaryrefslogtreecommitdiff
path: root/hal
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-04 01:21:57 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-08 13:46:01 +0100
commit8e81d25f5d50df77fb587da3d18abe6a7fa24e73 (patch)
treecd94d66c4078ae3938c9a6da4b0010a9c6a5551f /hal
parent0cfefdfd4221e043317b7838ca050cb853621e69 (diff)
downloaduxp-8e81d25f5d50df77fb587da3d18abe6a7fa24e73.tar.gz
Issue #2342: Use [[nodiscard]] in /hal /image and /intl
Diffstat (limited to 'hal')
-rw-r--r--hal/Hal.h6
-rw-r--r--hal/HalInternal.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/hal/Hal.h b/hal/Hal.h
index ced295ca4c..b4a0ab8bc3 100644
--- a/hal/Hal.h
+++ b/hal/Hal.h
@@ -333,7 +333,7 @@ void NotifyScreenConfigurationChange(const hal::ScreenConfiguration& aScreenConf
* Lock the screen orientation to the specific orientation.
* @return Whether the lock has been accepted.
*/
-MOZ_MUST_USE bool LockScreenOrientation(const dom::ScreenOrientationInternal& aOrientation);
+[[nodiscard]] bool LockScreenOrientation(const dom::ScreenOrientationInternal& aOrientation);
/**
* Unlock the screen orientation.
@@ -346,7 +346,7 @@ void UnlockScreenOrientation();
*
* Currently, there can only be 0 or 1 alarm observers.
*/
-MOZ_MUST_USE bool RegisterTheOneAlarmObserver(hal::AlarmObserver* aObserver);
+[[nodiscard]] bool RegisterTheOneAlarmObserver(hal::AlarmObserver* aObserver);
/**
* Unregister the alarm observer. Doing so will implicitly cancel any
@@ -373,7 +373,7 @@ void NotifyAlarmFired();
* This API is currently only allowed to be used from non-sandboxed
* contexts.
*/
-MOZ_MUST_USE bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds);
+[[nodiscard]] bool SetAlarm(int32_t aSeconds, int32_t aNanoseconds);
/**
* Set the priority of the given process.
diff --git a/hal/HalInternal.h b/hal/HalInternal.h
index b9c7686f71..4544dd1c53 100644
--- a/hal/HalInternal.h
+++ b/hal/HalInternal.h
@@ -56,7 +56,7 @@ void DisableScreenConfigurationNotifications();
/**
* Enable alarm notifications from the backend.
*/
-MOZ_MUST_USE bool EnableAlarm();
+[[nodiscard]] bool EnableAlarm();
/**
* Disable alarm notifications from the backend.