]> git.tdb.fi Git - libs/net.git/commitdiff
Mark special member functions as defaulted where appropriate
authorMikko Rasa <tdb@tdb.fi>
Fri, 9 Dec 2022 22:03:22 +0000 (00:03 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 9 Dec 2022 22:03:22 +0000 (00:03 +0200)
source/http/header.h
source/http/message.h
source/http/response.h
source/http/submessage.h
source/net/protocol.h
source/net/receiver.h
source/net/sockaddr.h

index c3d07f38dc81d75ec979ddc5538b0cc2c8aa4d54..0c6324bc6e5d59c838a44d9bdda8b3aa19e3ecc8 100644 (file)
@@ -33,7 +33,7 @@ struct Header
        std::string raw_value;
        std::vector<Value> values;
 
-       Header() { }
+       Header() = default;
        Header(const Message &, const std::string &, Style = DEFAULT);
        Header(const std::string &, const std::string &, Style = DEFAULT);
 
index e5253606b05e034c0ab9a208a6cd6cd32e39810d..7acce90d146dffa356adb885ba0449c13e4c6b9e 100644 (file)
@@ -23,7 +23,7 @@ protected:
 
        Message();
 public:
-       virtual ~Message() { }
+       virtual ~Message() = default;
 
        void set_header(const std::string &, const std::string &);
        bool has_header(const std::string &) const;
index bb471f0de4fe80879ea7da223152b8ee4e671486..8d88c92875f99fc2229cf5f7458c957b81cac2d4 100644 (file)
@@ -12,7 +12,7 @@ class Response: public Message
 private:
        Status status;
 
-       Response() { }
+       Response() = default;
 public:
        Response(Status);
        Status get_status() const { return status; }
index f60276a9267c7c6997215e7a01db49e01cf5a137..9cf4d2cff104bcc64bb8c1a4f90189358f2c5086 100644 (file)
@@ -9,7 +9,7 @@ namespace Http {
 class SubMessage: public Message
 {
 private:
-       SubMessage() { }
+       SubMessage() = default;
 
 public:
        virtual std::string str() const;
index cd68d5148735024eaa77f9ef1ebe06a16064de72..aca3ca8c1acba8698becd5bd637da570530d7e67 100644 (file)
@@ -36,7 +36,7 @@ private:
        template<typename C>
        struct CompoundTypeDef
        {
-               virtual ~CompoundTypeDef() { }
+               virtual ~CompoundTypeDef() = default;
 
                virtual std::string describe() const = 0;
                virtual char *serialize(const C &, char *, char *) const = 0;
@@ -165,7 +165,8 @@ private:
 
                PacketDefBase(unsigned);
        public:
-               virtual ~PacketDefBase() { }
+               virtual ~PacketDefBase() = default;
+
                virtual unsigned get_class_id() const = 0;
                unsigned get_id() const { return id; }
                virtual std::string describe() const = 0;
index 19e69e0d4c5926ceaa9c23ec518731fdcc82fcf3..de7209e4fc765d9d8d6d1d558aebecb6d075309f 100644 (file)
@@ -7,16 +7,16 @@ namespace Net {
 class ReceiverBase
 {
 protected:
-       ReceiverBase() { }
+       ReceiverBase() = default;
 public:
-       virtual ~ReceiverBase() { }
+       virtual ~ReceiverBase() = default;
 };
 
 template<typename P>
 class PacketReceiver: public virtual ReceiverBase
 {
 protected:
-       PacketReceiver() { }
+       PacketReceiver() = default;
 public:
        virtual void receive(const P &) = 0;
 };
index aad5e29065e5695ff6b8794cf5dd95f5696e2dc3..9db8b18afdbc980d96b9aad2f3403debee1b98ea 100644 (file)
@@ -13,9 +13,9 @@ public:
        struct SysAddr;
 
 protected:
-       SockAddr() { }
+       SockAddr() = default;
 public:
-       virtual ~SockAddr() { }
+       virtual ~SockAddr() = default;
 
        virtual SockAddr *copy() const = 0;