diff options
| author | levlam <levlam@telegram.org> | 2022-10-01 16:29:56 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-10-01 16:29:56 +0300 |
| commit | d4d365d31fb4acfeae27d089b403b5e60b1c3680 (patch) | |
| tree | 4caf0be42066fb1842a3a5983561e48cb16abdc6 /tdactor/td | |
| parent | be87e4179f9ce80fe4352eec0a0a9937d420284a (diff) | |
Remove template ActorOwn::reset.
Diffstat (limited to 'tdactor/td')
| -rw-r--r-- | tdactor/td/actor/impl/ActorId-decl.h | 2 | ||||
| -rw-r--r-- | tdactor/td/actor/impl/ActorId.h | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/tdactor/td/actor/impl/ActorId-decl.h b/tdactor/td/actor/impl/ActorId-decl.h index 9fc7f6b98..220abcdb3 100644 --- a/tdactor/td/actor/impl/ActorId-decl.h +++ b/tdactor/td/actor/impl/ActorId-decl.h @@ -123,8 +123,6 @@ class ActorShared { ActorId<ActorType> get() const; ActorId<ActorType> release(); void reset(ActorId<ActorType> other = ActorId<ActorType>()); - template <class OtherActorType> - void reset(ActorId<OtherActorType> other); private: ActorId<ActorType> id_; diff --git a/tdactor/td/actor/impl/ActorId.h b/tdactor/td/actor/impl/ActorId.h index 30cbbfb91..389833e19 100644 --- a/tdactor/td/actor/impl/ActorId.h +++ b/tdactor/td/actor/impl/ActorId.h @@ -160,17 +160,11 @@ ActorId<ActorType> ActorShared<ActorType>::release() { template <class ActorType> void ActorShared<ActorType>::reset(ActorId<ActorType> other) { - reset<ActorType>(std::move(other)); -} - -template <class ActorType> -template <class OtherActorType> -void ActorShared<ActorType>::reset(ActorId<OtherActorType> other) { static_assert(sizeof(ActorType) > 0, "Can't use ActorShared with incomplete type"); if (!id_.empty()) { send_event(*this, Event::hangup()); } - id_ = static_cast<ActorId<ActorType>>(other); + id_ = std::move(other); } template <class T> |
