summaryrefslogtreecommitdiff
path: root/js/src/gc/NurseryAwareHashMap.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-04 20:06:50 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-08 13:48:12 +0100
commit706d07b3d560955745a7dd4addb0ea52ac18d94b (patch)
tree581db1c66c37f92bf7759aae1ef45acc7ad38201 /js/src/gc/NurseryAwareHashMap.h
parenteb7be8c637b7b382161d009b302ae9713470c553 (diff)
downloaduxp-706d07b3d560955745a7dd4addb0ea52ac18d94b.tar.gz
Issue #2342: Use [[nodiscard]] in /js
Diffstat (limited to 'js/src/gc/NurseryAwareHashMap.h')
-rw-r--r--js/src/gc/NurseryAwareHashMap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/gc/NurseryAwareHashMap.h b/js/src/gc/NurseryAwareHashMap.h
index 9f9486deaa..9f24e51616 100644
--- a/js/src/gc/NurseryAwareHashMap.h
+++ b/js/src/gc/NurseryAwareHashMap.h
@@ -83,7 +83,7 @@ class NurseryAwareHashMap
explicit NurseryAwareHashMap(AllocPolicy a = AllocPolicy()) : map(a) {}
- MOZ_MUST_USE bool init(uint32_t len = 16) { return map.init(len); }
+ [[nodiscard]] bool init(uint32_t len = 16) { return map.init(len); }
bool empty() const { return map.empty(); }
Ptr lookup(const Lookup& l) const { return map.lookup(l); }
@@ -99,7 +99,7 @@ class NurseryAwareHashMap
return map.sizeOfIncludingThis(mallocSizeOf);
}
- MOZ_MUST_USE bool put(const Key& k, const Value& v) {
+ [[nodiscard]] bool put(const Key& k, const Value& v) {
auto p = map.lookupForAdd(k);
if (p) {
if (!JS::GCPolicy<Key>::isTenured(k) || !JS::GCPolicy<Value>::isTenured(v)) {