diff options
| author | levlam <levlam@telegram.org> | 2022-10-01 15:58:27 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-10-01 15:58:27 +0300 |
| commit | be87e4179f9ce80fe4352eec0a0a9937d420284a (patch) | |
| tree | 095ecad4caea3926c02b509558b75e2fc7399f22 /tdactor/td | |
| parent | 39d2ac80b0212102ecf4f9421d68c0060aff42e0 (diff) | |
Inline ActorOwn::hangup.
Diffstat (limited to 'tdactor/td')
| -rw-r--r-- | tdactor/td/actor/impl/ActorId-decl.h | 1 | ||||
| -rw-r--r-- | tdactor/td/actor/impl/ActorId.h | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/tdactor/td/actor/impl/ActorId-decl.h b/tdactor/td/actor/impl/ActorId-decl.h index 03db2775b..9fc7f6b98 100644 --- a/tdactor/td/actor/impl/ActorId-decl.h +++ b/tdactor/td/actor/impl/ActorId-decl.h @@ -90,7 +90,6 @@ class ActorOwn { ActorId<ActorType> get() const; ActorId<ActorType> release(); void reset(ActorId<ActorType> other = ActorId<ActorType>()); - void hangup() const; ActorType *get_actor_unsafe() const; private: diff --git a/tdactor/td/actor/impl/ActorId.h b/tdactor/td/actor/impl/ActorId.h index fa93118e2..30cbbfb91 100644 --- a/tdactor/td/actor/impl/ActorId.h +++ b/tdactor/td/actor/impl/ActorId.h @@ -88,15 +88,10 @@ ActorId<ActorType> ActorOwn<ActorType>::release() { template <class ActorType> void ActorOwn<ActorType>::reset(ActorId<ActorType> other) { static_assert(sizeof(ActorType) > 0, "Can't use ActorOwn with incomplete type"); - hangup(); - id_ = std::move(other); -} - -template <class ActorType> -void ActorOwn<ActorType>::hangup() const { if (!id_.empty()) { send_event(id_, Event::hangup()); } + id_ = std::move(other); } template <class ActorType> |
