]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2094] (unrelated cleanup) use the term 'copy constructor' to mean it.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 18 Jul 2012 22:29:17 +0000 (15:29 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 18 Jul 2012 22:29:17 +0000 (15:29 -0700)
and remove the unnecessary 'explicit' from it ('non-explicit' usage
wouldn't be a copy constructor in the first place).

src/lib/dns/labelsequence.h

index 48f3241796676ad2297b25b5218ae6a50068b92a..d6f02c91ca69b63dd95aa402d9c38ae826ff7eea 100644 (file)
@@ -46,23 +46,6 @@ class LabelSequence {
     friend std::string Name::toText(bool) const;
 
 public:
-    /// \brief Constructs a LabelSequence for the given label sequence
-    ///
-    /// \note The associated data MUST remain in scope during the lifetime
-    /// of this LabelSequence, since only the pointers are copied.
-    ///
-    /// \note No validation is done on the given data upon construction;
-    ///       use with care.
-    ///
-    /// \param ls The LabelSequence to construct a LabelSequence from
-    explicit LabelSequence(const LabelSequence& ls):
-                                     data_(ls.data_),
-                                     offsets_(ls.offsets_),
-                                     offsets_size_(ls.offsets_size_),
-                                     first_label_(ls.first_label_),
-                                     last_label_(ls.last_label_)
-    {}
-
     /// \brief Constructs a LabelSequence for the given name
     ///
     /// \note The associated Name MUST remain in scope during the lifetime
@@ -98,6 +81,23 @@ public:
                   const uint8_t* offsets,
                   size_t offsets_size);
 
+    /// \brief Copy constructor.
+    ///
+    /// \note The associated data MUST remain in scope during the lifetime
+    /// of this LabelSequence, since only the pointers are copied.
+    ///
+    /// \note No validation is done on the given data upon construction;
+    ///       use with care.
+    ///
+    /// \param ls The LabelSequence to construct a LabelSequence from
+    LabelSequence(const LabelSequence& ls):
+                                     data_(ls.data_),
+                                     offsets_(ls.offsets_),
+                                     offsets_size_(ls.offsets_size_),
+                                     first_label_(ls.first_label_),
+                                     last_label_(ls.last_label_)
+    {}
+
     /// \brief Return the wire-format data for this LabelSequence
     ///
     /// The data is returned as a pointer to (the part of) the original