diff options
Diffstat (limited to 'js/src/ctypes/CTypes.h')
-rw-r--r-- | js/src/ctypes/CTypes.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/ctypes/CTypes.h b/js/src/ctypes/CTypes.h index ae372d92be..7eb4c1020a 100644 --- a/js/src/ctypes/CTypes.h +++ b/js/src/ctypes/CTypes.h @@ -178,7 +178,7 @@ GetDeflatedUTF8StringLength(JSContext* maybecx, const CharT* chars, size_t charsLength); template <typename CharT> -MOZ_MUST_USE bool +[[nodiscard]] bool DeflateStringToUTF8Buffer(JSContext* maybecx, const CharT* src, size_t srclen, char* dst, size_t* dstlenp); @@ -456,7 +456,7 @@ namespace CType { TypeCode GetTypeCode(JSObject* typeObj); bool TypesEqual(JSObject* t1, JSObject* t2); size_t GetSize(JSObject* obj); - MOZ_MUST_USE bool GetSafeSize(JSObject* obj, size_t* result); + [[nodiscard]] bool GetSafeSize(JSObject* obj, size_t* result); bool IsSizeDefined(JSObject* obj); size_t GetAlignment(JSObject* obj); ffi_type* GetFFIType(JSContext* cx, JSObject* obj); @@ -480,12 +480,12 @@ namespace ArrayType { JSObject* GetBaseType(JSObject* obj); size_t GetLength(JSObject* obj); - MOZ_MUST_USE bool GetSafeLength(JSObject* obj, size_t* result); + [[nodiscard]] bool GetSafeLength(JSObject* obj, size_t* result); UniquePtrFFIType BuildFFIType(JSContext* cx, JSObject* obj); } // namespace ArrayType namespace StructType { - MOZ_MUST_USE bool DefineInternal(JSContext* cx, JSObject* typeObj, JSObject* fieldsObj); + [[nodiscard]] bool DefineInternal(JSContext* cx, JSObject* typeObj, JSObject* fieldsObj); const FieldInfoHash* GetFieldInfo(JSObject* obj); const FieldInfo* LookupField(JSContext* cx, JSObject* obj, JSFlatString* name); @@ -521,9 +521,9 @@ namespace CData { bool IsCDataProto(JSObject* obj); // Attached by JSAPI as the function 'ctypes.cast' - MOZ_MUST_USE bool Cast(JSContext* cx, unsigned argc, Value* vp); + [[nodiscard]] bool Cast(JSContext* cx, unsigned argc, Value* vp); // Attached by JSAPI as the function 'ctypes.getRuntime' - MOZ_MUST_USE bool GetRuntime(JSContext* cx, unsigned argc, Value* vp); + [[nodiscard]] bool GetRuntime(JSContext* cx, unsigned argc, Value* vp); } // namespace CData namespace Int64 { |