From ffaf121d24428a9d822c1e3de512b9593be7aa0e Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Wed, 1 Jul 2015 21:26:28 +0200 Subject: Implement CRTP for tag --- src/tag_compound.cpp | 15 --------------- src/tag_string.cpp | 15 --------------- 2 files changed, 30 deletions(-) (limited to 'src') diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp index 1d4fd6d720..6aa12e64ff 100644 --- a/src/tag_compound.cpp +++ b/src/tag_compound.cpp @@ -84,21 +84,6 @@ tag_type tag_compound::get_type() const noexcept return type; } -std::unique_ptr tag_compound::move_clone() && -{ - return std::unique_ptr(new tag_compound(std::move(*this))); -} - -bool tag_compound::equals(const tag& rhs) const -{ - return *this == static_cast(rhs); -} - -tag_compound& tag_compound::assign(tag&& rhs) -{ - return *this = dynamic_cast(rhs); -} - bool operator==(const tag_compound& lhs, const tag_compound& rhs) { return lhs.tags == rhs.tags; diff --git a/src/tag_string.cpp b/src/tag_string.cpp index aade42768b..1f1e242e3a 100644 --- a/src/tag_string.cpp +++ b/src/tag_string.cpp @@ -72,21 +72,6 @@ tag_type tag_string::get_type() const noexcept return type; } -std::unique_ptr tag_string::move_clone() && -{ - return std::unique_ptr(new tag_string(std::move(*this))); -} - -bool tag_string::equals(const tag& rhs) const -{ - return *this == static_cast(rhs); -} - -tag_string& tag_string::assign(tag&& rhs) -{ - return *this = dynamic_cast(rhs); -} - bool operator==(const tag_string& lhs, const tag_string& rhs) { return lhs.get() == rhs.get(); -- cgit 0.0.5-2-1-g0f52