From 6483ea5b4776f9829e95495a836fe1d0a88b11d8 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 08676c7b..8553a56f 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; } } };