summaryrefslogtreecommitdiff
path: root/js/src/vm/Printer.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/Printer.h')
-rw-r--r--js/src/vm/Printer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/vm/Printer.h b/js/src/vm/Printer.h
index 60f1a62716..9f96e6f16d 100644
--- a/js/src/vm/Printer.h
+++ b/js/src/vm/Printer.h
@@ -83,14 +83,14 @@ class Sprinter final : public GenericPrinter
size_t size; // size of buffer allocated at base
ptrdiff_t offset; // offset of next free char in buffer
- MOZ_MUST_USE bool realloc_(size_t newSize);
+ [[nodiscard]] bool realloc_(size_t newSize);
public:
explicit Sprinter(ExclusiveContext* cx, bool shouldReportOOM = true);
~Sprinter();
// Initialize this sprinter, returns false on error.
- MOZ_MUST_USE bool init();
+ [[nodiscard]] bool init();
void checkInvariants() const;
@@ -114,7 +114,7 @@ class Sprinter final : public GenericPrinter
// Format the given format/arguments as if by JS_vsmprintf, then put it.
// Return true on success, else return false and report an error (typically
// OOM).
- MOZ_MUST_USE bool jsprintf(const char* fmt, ...) MOZ_FORMAT_PRINTF(2, 3);
+ [[nodiscard]] bool jsprintf(const char* fmt, ...) MOZ_FORMAT_PRINTF(2, 3);
// Prints a formatted string into the buffer.
virtual int vprintf(const char* fmt, va_list ap) override;
@@ -142,7 +142,7 @@ class Fprinter final : public GenericPrinter
~Fprinter();
// Initialize this printer, returns false on error.
- MOZ_MUST_USE bool init(const char* path);
+ [[nodiscard]] bool init(const char* path);
void init(FILE* fp);
bool isInitialized() const {
return file_ != nullptr;