]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/socket.h
Use the override specifier when overriding
[libs/net.git] / source / net / socket.h
index a3823ee44d777d008a3454ee0d76e4d90cac7d42..d917bd8e37e9d1b9a7d81adbfbc98053d6738406 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_NET_SOCKET_H_
 #define MSP_NET_SOCKET_H_
 
+#include <msp/core/except.h>
 #include <msp/io/eventobject.h>
 #include <msp/io/handle.h>
 #include "constants.h"
 namespace Msp {
 namespace Net {
 
-class bad_socket_state: public std::logic_error
+class bad_socket_state: public invalid_state
 {
 public:
-       bad_socket_state(const std::string &w): std::logic_error(w) { }
+       bad_socket_state(const std::string &w): invalid_state(w) { }
 };
 
 
@@ -40,10 +41,10 @@ private:
 public:
        ~Socket();
 
-       virtual void set_block(bool);
-       virtual void set_inherit(bool);
+       void set_block(bool) override;
+       void set_inherit(bool) override;
        const IO::Handle &get_handle(IO::Mode);
-       virtual const IO::Handle &get_event_handle();
+       const IO::Handle &get_event_handle() override;
 
        /** Associates the socket with a local address.  There must be no existing
        users of the address. */