Skip to content

Commit

Permalink
console: Fixed some missing nodiscard markings
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonmux committed Aug 21, 2023
1 parent 4c4e788 commit 6483ea5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions substrate/console
Original file line number Diff line number Diff line change
Expand Up @@ -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<void *>(_get_osfhandle(fd)); }
#endif
Expand Down Expand Up @@ -299,7 +299,7 @@ namespace substrate
stream.write(char(digit + 7));
else
stream.write(digit);
value <<= 4;
value <<= 4U;
}
}
};
Expand Down

0 comments on commit 6483ea5

Please sign in to comment.