Skip to content

Commit

Permalink
Fix -Wextra warnings in public headers
Browse files Browse the repository at this point in the history
Fixes #154.
  • Loading branch information
magiblot committed Feb 28, 2024
1 parent be6e64f commit d1fa783
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions include/tvision/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,14 @@ inline BOOL THardwareInfo::setCtrlBrkHandler( BOOL install ) noexcept
#ifdef _WIN32
return SetConsoleCtrlHandler( &THardwareInfo::ctrlBreakHandler, install );
#else
/* Sets THardwareInfo::ctrlBreakHandle as the handler of control signals
* CTRL_C_EVENT and CTRL_BREAK_EVENT. When the signal is received, the
* handler sets the attribute TSystemError::ctrlBreakHit to true.
* https://docs.microsoft.com/en-us/windows/console/handlerroutine
*/
// Stub
(void) install;
return TRUE;
#endif
}

inline BOOL THardwareInfo::setCritErrorHandler( BOOL install ) noexcept
{
(void) install;
return TRUE; // Handled by NT or DPMI32..
}

Expand Down
6 changes: 3 additions & 3 deletions include/tvision/tstrview.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ inline constexpr const char _FAR * TStringView::cend() const
#if defined(TVISION_STL) && (__cplusplus >= 201703L || __cpp_lib_constexpr_char_traits)
inline constexpr Boolean operator==(TStringView a, TStringView b)
{
return a.size() == b.size()
? std::char_traits<char>::compare(a.data(), b.data(), b.size()) == 0
: False;
if (a.size() == b.size())
return Boolean( std::char_traits<char>::compare(a.data(), b.data(), b.size()) == 0 );
return False;
}
#else
inline Boolean operator==(TStringView a, TStringView b)
Expand Down

0 comments on commit d1fa783

Please sign in to comment.