Browse Source

[2726] Use initializer list

Instead of assignment in the copy constructor.
Michal 'vorner' Vaner 12 years ago
parent
commit
a0b8bc3685
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/lib/dns/rdata/generic/detail/ds_like.h

+ 6 - 6
src/lib/dns/rdata/generic/detail/ds_like.h

@@ -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.
     ///