diff --git a/include/tclap/Arg.h b/include/tclap/Arg.h index f8c4a5f..0ca6a3e 100644 --- a/include/tclap/Arg.h +++ b/include/tclap/Arg.h @@ -205,7 +205,7 @@ class Arg * The char used as a place holder when SwitchArgs are combined. * Currently set to the bell char (ASCII 7). */ - static char blankChar() { return (char)7; } + static char blankChar() { return static_cast(7); } /** * The char that indicates the beginning of a flag. Defaults to '-', but diff --git a/include/tclap/ArgException.h b/include/tclap/ArgException.h index 2102095..58cb06b 100644 --- a/include/tclap/ArgException.h +++ b/include/tclap/ArgException.h @@ -54,10 +54,6 @@ class ArgException : public std::exception _typeDescription(td) { } - /** - * Destructor. - */ - virtual ~ArgException() throw() { } /** * Returns the error text. @@ -78,7 +74,7 @@ class ArgException : public std::exception /** * Returns the arg id and error text. */ - const char* what() const throw() + const char* what() const noexcept { static std::string ex; ex = _argId + " -- " + _errorText; diff --git a/include/tclap/ArgTraits.h b/include/tclap/ArgTraits.h index 0ccf5e3..cd5d69f 100644 --- a/include/tclap/ArgTraits.h +++ b/include/tclap/ArgTraits.h @@ -38,7 +38,6 @@ namespace TCLAP { */ struct ValueLike { typedef ValueLike ValueCategory; - virtual ~ValueLike() {} }; /** diff --git a/include/tclap/CmdLine.h b/include/tclap/CmdLine.h index be78985..316f561 100644 --- a/include/tclap/CmdLine.h +++ b/include/tclap/CmdLine.h @@ -137,7 +137,7 @@ class CmdLine : public CmdLineInterface /** * Throws an exception listing the missing args. */ - void missingArgsException(); + [[ noreturn ]] void missingArgsException(); /** * Checks whether a name/flag string matches entirely matches @@ -533,7 +533,7 @@ inline bool CmdLine::_emptyCombined(const std::string& s) return true; } -inline void CmdLine::missingArgsException() +[[ noreturn ]] inline void CmdLine::missingArgsException() { int count = 0;