From 707ea1dee1b346cee2cbd106ed7e73316fbfc727 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Wed, 4 Aug 2021 15:19:54 +0200 Subject: [PATCH] REVIEW: removed Switch --- include/caosdb/entity.h | 1 - src/caosdb/entity.cpp | 7 ------- 2 files changed, 8 deletions(-) diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h index 6d4b451..d3eb784 100644 --- a/include/caosdb/entity.h +++ b/include/caosdb/entity.h @@ -450,7 +450,6 @@ public: auto AppendProperty(const Property &property) -> void; auto AppendParent(const Parent &parent) -> void; - auto Switch(ProtoEntity *entity) -> void; /** * Copy all of this entity's features to the target ProtoEntity. */ diff --git a/src/caosdb/entity.cpp b/src/caosdb/entity.cpp index 999ba37..1d61666 100644 --- a/src/caosdb/entity.cpp +++ b/src/caosdb/entity.cpp @@ -177,13 +177,6 @@ auto Entity::SetVersionId(const std::string &id) -> void { this->wrapped->mutable_version()->set_id(id); } -// TODO(tf) Re-implement s.th. properties and parents are kept. -auto Entity::Switch(ProtoEntity *entity) -> void { - this->wrapped->Swap(entity); - this->wrapped->Clear(); - this->wrapped = entity; -} - auto Entity::CopyTo(ProtoEntity *target) -> void { target->CopyFrom(*(this->wrapped)); } -- GitLab