From: JINMEI Tatuya Date: Wed, 18 Jul 2012 22:29:17 +0000 (-0700) Subject: [2094] (unrelated cleanup) use the term 'copy constructor' to mean it. X-Git-Tag: trac2351_base~158^2~16^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=220170cd0ea975cf86174d5bea6b256c814e27e0;p=thirdparty%2Fkea.git [2094] (unrelated cleanup) use the term 'copy constructor' to mean it. and remove the unnecessary 'explicit' from it ('non-explicit' usage wouldn't be a copy constructor in the first place). --- diff --git a/src/lib/dns/labelsequence.h b/src/lib/dns/labelsequence.h index 48f3241796..d6f02c91ca 100644 --- a/src/lib/dns/labelsequence.h +++ b/src/lib/dns/labelsequence.h @@ -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