mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +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;
|
||||
}
|
||||
|
||||
Tag::Tag(Tag&& other) noexcept {
|
||||
type = other.type;
|
||||
subtype = other.subtype;
|
||||
val = std::move(other.val);
|
||||
etype = std::move(other.etype);
|
||||
}
|
||||
|
||||
Tag::Tag() {
|
||||
val = nullptr;
|
||||
etype = nullptr;
|
||||
|
|
|
@ -100,6 +100,11 @@ public:
|
|||
*/
|
||||
Tag(const Tag& other);
|
||||
|
||||
/**
|
||||
* Move constructor.
|
||||
*/
|
||||
Tag(Tag&& other) noexcept;
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue