]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2726] Use initializer list
authorMichal 'vorner' Vaner <vorner@vorner.cz>
Fri, 14 Jun 2013 07:38:11 +0000 (09:38 +0200)
committerMichal 'vorner' Vaner <vorner@vorner.cz>
Fri, 14 Jun 2013 07:38:11 +0000 (09:38 +0200)
Instead of assignment in the copy constructor.

src/lib/dns/rdata/generic/detail/ds_like.h

index a7bebbfa46f9b0e90c459d374260becf493b61f5..c143cab3f618c96f2f5b138aa7bf2cfdffc88464 100644 (file)
@@ -188,12 +188,12 @@ public:
     /// \brief The copy constructor.
     ///
     /// Trivial for now, we could've used the default one.
-    DSLikeImpl(const DSLikeImpl& source) {
-        digest_ = source.digest_;
-        tag_ = source.tag_;
-        algorithm_ = source.algorithm_;
-        digest_type_ = source.digest_type_;
-    }
+    DSLikeImpl(const DSLikeImpl& source) :
+        tag_(source.tag_),
+        algorithm_(source.algorithm_),
+        digest_type_(source.digest_type_),
+        digest_(source.digest_)
+    {}
 
     /// \brief Convert the DS-like data to a string.
     ///