Skip to content

Commit

Permalink
console: Added a missing nodiscard marking for the Windows-specific h…
Browse files Browse the repository at this point in the history
…andle() function
  • Loading branch information
dragonmux committed Oct 31, 2023
1 parent af53569 commit ff9fdfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion substrate/console
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ namespace substrate
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)); }
SUBSTRATE_NO_DISCARD(void *handle() const noexcept)
{ return reinterpret_cast<void *>(_get_osfhandle(fd)); }
#endif

void write(const void *buffer, size_t bufferLen) const noexcept;
Expand Down

0 comments on commit ff9fdfc

Please sign in to comment.