Commit 220170cd authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[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).
parent 69d48505
...@@ -46,23 +46,6 @@ class LabelSequence { ...@@ -46,23 +46,6 @@ class LabelSequence {
friend std::string Name::toText(bool) const; friend std::string Name::toText(bool) const;
public: 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 /// \brief Constructs a LabelSequence for the given name
/// ///
/// \note The associated Name MUST remain in scope during the lifetime /// \note The associated Name MUST remain in scope during the lifetime
...@@ -98,6 +81,23 @@ public: ...@@ -98,6 +81,23 @@ public:
const uint8_t* offsets, const uint8_t* offsets,
size_t offsets_size); 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 /// \brief Return the wire-format data for this LabelSequence
/// ///
/// The data is returned as a pointer to (the part of) the original /// The data is returned as a pointer to (the part of) the original
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment