From 1f8b20771a893df5cf46f76fb6f57d2a074a2c5e Mon Sep 17 00:00:00 2001 From: dragonmux Date: Mon, 21 Aug 2023 17:02:04 +0100 Subject: [PATCH] console: Fixed some missing nodiscard markings --- substrate/console | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/console b/substrate/console index aedc0883..c7711fc3 100644 --- a/substrate/console +++ b/substrate/console @@ -56,8 +56,8 @@ namespace substrate public: constexpr consoleStream_t() noexcept = default; consoleStream_t(const int32_t desc) noexcept : fd{desc} { checkTTY(); } - constexpr bool valid() const noexcept { return fd != -1; } - constexpr bool isTTY() const noexcept { return _tty; } + SUBSTRATE_NO_DISCARD(constexpr bool valid() const noexcept) { return fd != -1; } + SUBSTRATE_NO_DISCARD(constexpr bool isTTY() const noexcept) { return _tty; } #if defined(_WIN32) void *handle() const noexcept { return reinterpret_cast(_get_osfhandle(fd)); } #endif @@ -299,7 +299,7 @@ namespace substrate stream.write(char(digit + 7)); else stream.write(digit); - value <<= 4; + value <<= 4U; } } };