mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add move constructor to Tag class
This commit is contained in:
parent
ed47eedd6a
commit
989e4adf90
2 changed files with 12 additions and 0 deletions
|
@ -37,6 +37,13 @@ Tag::Tag(const Tag& other) {
|
||||||
etype = other.etype;
|
etype = other.etype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tag::Tag(Tag&& other) noexcept {
|
||||||
|
type = other.type;
|
||||||
|
subtype = other.subtype;
|
||||||
|
val = std::move(other.val);
|
||||||
|
etype = std::move(other.etype);
|
||||||
|
}
|
||||||
|
|
||||||
Tag::Tag() {
|
Tag::Tag() {
|
||||||
val = nullptr;
|
val = nullptr;
|
||||||
etype = nullptr;
|
etype = nullptr;
|
||||||
|
|
|
@ -100,6 +100,11 @@ public:
|
||||||
*/
|
*/
|
||||||
Tag(const Tag& other);
|
Tag(const Tag& other);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move constructor.
|
||||||
|
*/
|
||||||
|
Tag(Tag&& other) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue