diff --git a/src/lib/base/XBase.cpp b/src/lib/base/XBase.cpp index 016b3ebde..a149c5b7a 100644 --- a/src/lib/base/XBase.cpp +++ b/src/lib/base/XBase.cpp @@ -34,7 +34,7 @@ const char *XBase::what() const throw() return m_what.c_str(); } -std::string XBase::format(const char * /*id*/, const char *fmt, ...) const throw() +std::string XBase::format(const char * /*id*/, const char *fmt, ...) const noexcept { // FIXME -- lookup message string using id as an index. set // fmt to that string if it exists. diff --git a/src/lib/base/XBase.h b/src/lib/base/XBase.h index 9625b270e..16ff6fa04 100644 --- a/src/lib/base/XBase.h +++ b/src/lib/base/XBase.h @@ -28,7 +28,7 @@ public: protected: //! Get a human readable string describing the exception - virtual std::string getWhat() const throw() + virtual std::string getWhat() const noexcept { return ""; } @@ -39,7 +39,7 @@ protected: no format can be found, then replaces positional parameters in the format string and returns the result. */ - virtual std::string format(const char *id, const char *defaultFormat, ...) const throw(); + virtual std::string format(const char *id, const char *defaultFormat, ...) const noexcept; private: mutable std::string m_what; diff --git a/src/lib/deskflow/XDeskflow.cpp b/src/lib/deskflow/XDeskflow.cpp index b568294ed..57d1fcddf 100644 --- a/src/lib/deskflow/XDeskflow.cpp +++ b/src/lib/deskflow/XDeskflow.cpp @@ -35,12 +35,12 @@ XIncompatibleClient::XIncompatibleClient(int major, int minor) : m_major(major), // do nothing } -int XIncompatibleClient::getMajor() const throw() +int XIncompatibleClient::getMajor() const noexcept { return m_major; } -int XIncompatibleClient::getMinor() const throw() +int XIncompatibleClient::getMinor() const noexcept { return m_minor; } @@ -62,7 +62,7 @@ XDuplicateClient::XDuplicateClient(const std::string &name) : m_name(name) // do nothing } -const std::string &XDuplicateClient::getName() const throw() +const std::string &XDuplicateClient::getName() const noexcept { return m_name; } @@ -81,7 +81,7 @@ XUnknownClient::XUnknownClient(const std::string &name) : m_name(name) // do nothing } -const std::string &XUnknownClient::getName() const throw() +const std::string &XUnknownClient::getName() const noexcept { return m_name; } @@ -100,7 +100,7 @@ XExitApp::XExitApp(int code) : m_code(code) // do nothing } -int XExitApp::getCode() const throw() +int XExitApp::getCode() const noexcept { return m_code; } diff --git a/src/lib/deskflow/XDeskflow.h b/src/lib/deskflow/XDeskflow.h index 46b719205..15cf0e4b1 100644 --- a/src/lib/deskflow/XDeskflow.h +++ b/src/lib/deskflow/XDeskflow.h @@ -52,9 +52,9 @@ public: //@{ //! Get client's major version number - int getMajor() const throw(); + int getMajor() const noexcept; //! Get client's minor version number - int getMinor() const throw(); + int getMinor() const noexcept; //@} @@ -81,7 +81,7 @@ public: //@{ //! Get client's name - virtual const std::string &getName() const throw(); + virtual const std::string &getName() const noexcept; //@} @@ -107,7 +107,7 @@ public: //@{ //! Get the client's name - virtual const std::string &getName() const throw(); + virtual const std::string &getName() const noexcept; //@} @@ -131,7 +131,7 @@ public: ~XExitApp() throw() override = default; //! Get the exit code - int getCode() const throw(); + int getCode() const noexcept; protected: std::string getWhat() const throw() override; diff --git a/src/lib/net/XSocket.cpp b/src/lib/net/XSocket.cpp index 28d0e3a6e..ecc35cf68 100644 --- a/src/lib/net/XSocket.cpp +++ b/src/lib/net/XSocket.cpp @@ -12,7 +12,7 @@ // XSocketAddress // -XSocketAddress::XSocketAddress(EError error, const std::string &hostname, int port) throw() +XSocketAddress::XSocketAddress(EError error, const std::string &hostname, int port) noexcept : m_error(error), m_hostname(hostname), m_port(port) @@ -20,17 +20,17 @@ XSocketAddress::XSocketAddress(EError error, const std::string &hostname, int po // do nothing } -XSocketAddress::EError XSocketAddress::getError() const throw() +XSocketAddress::EError XSocketAddress::getError() const noexcept { return m_error; } -std::string XSocketAddress::getHostname() const throw() +std::string XSocketAddress::getHostname() const noexcept { return m_hostname; } -int XSocketAddress::getPort() const throw() +int XSocketAddress::getPort() const noexcept { return m_port; } diff --git a/src/lib/net/XSocket.h b/src/lib/net/XSocket.h index d3bc699e8..95b55c8ad 100644 --- a/src/lib/net/XSocket.h +++ b/src/lib/net/XSocket.h @@ -36,18 +36,18 @@ public: kBadPort //!< The port is invalid }; - XSocketAddress(EError, const std::string &hostname, int port) throw(); + XSocketAddress(EError, const std::string &hostname, int port) noexcept; ~XSocketAddress() throw() override = default; //! @name accessors //@{ //! Get the error code - EError getError() const throw(); + EError getError() const noexcept; //! Get the hostname - std::string getHostname() const throw(); + std::string getHostname() const noexcept; //! Get the port - int getPort() const throw(); + int getPort() const noexcept; //@}