summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-06-30 19:28:35 +0200
committerljfa-ag <ljfa-ag@web.de>2015-06-30 19:28:35 +0200
commit26a08e6eeabec972cf57c6eb4e8f91516ad07f0c (patch)
treee9d899c2155e35e2abc81ed8d672e7b4eb3a8dc5 /src
parent955bdfe3ae22039923d8d4df2ba3892031c55064 (diff)
downloadProject-Tick-26a08e6eeabec972cf57c6eb4e8f91516ad07f0c.tar.gz
Project-Tick-26a08e6eeabec972cf57c6eb4e8f91516ad07f0c.zip
Create move_clone method
Diffstat (limited to 'src')
-rw-r--r--src/tag_compound.cpp5
-rw-r--r--src/tag_string.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp
index 5e9d81aaf7..20cb021df8 100644
--- a/src/tag_compound.cpp
+++ b/src/tag_compound.cpp
@@ -84,6 +84,11 @@ tag_type tag_compound::get_type() const noexcept
return type;
}
+std::unique_ptr<tag> tag_compound::move_clone() &&
+{
+ return std::unique_ptr<tag>(new tag_compound(std::move(*this)));
+}
+
bool tag_compound::equals(const tag& rhs) const
{
return tags == static_cast<const tag_compound&>(rhs).tags;
diff --git a/src/tag_string.cpp b/src/tag_string.cpp
index 6a759088e5..6322d4a42c 100644
--- a/src/tag_string.cpp
+++ b/src/tag_string.cpp
@@ -72,6 +72,11 @@ tag_type tag_string::get_type() const noexcept
return type;
}
+std::unique_ptr<tag> tag_string::move_clone() &&
+{
+ return std::unique_ptr<tag>(new tag_string(std::move(*this)));
+}
+
bool tag_string::equals(const tag& rhs) const
{
return value == static_cast<const tag_string&>(rhs).value;