diff options
author | kruall <kruall@ydb.tech> | 2022-12-26 17:52:04 +0300 |
---|---|---|
committer | kruall <kruall@ydb.tech> | 2022-12-26 17:52:04 +0300 |
commit | 658ffdd936d97fc3053df3f0830c029533ae409a (patch) | |
tree | a8c37bda2b664b98896e530de4666e67615d7ef0 /library | |
parent | 99cb30abce005e4f2073b737ca09b88da18c687f (diff) | |
download | ydb-658ffdd936d97fc3053df3f0830c029533ae409a.tar.gz |
Remove needless template in send methods,
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/actors/core/actor.h | 20 | ||||
-rw-r--r-- | library/cpp/actors/core/actor_coroutine.h | 3 |
2 files changed, 9 insertions, 14 deletions
diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h index bc42b37147..bae29cc847 100644 --- a/library/cpp/actors/core/actor.h +++ b/library/cpp/actors/core/actor.h @@ -111,16 +111,14 @@ namespace NActors { } bool Send(const TActorId& recipient, IEventBase* ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const; - template <typename TEvent> - bool Send(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const { - return Send(recipient, static_cast<IEventBase*>(ev.Release()), flags, cookie, std::move(traceId)); + bool Send(const TActorId& recipient, THolder<IEventBase> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const { + return Send(recipient, ev.Release(), flags, cookie, std::move(traceId)); } bool Send(TAutoPtr<IEventHandle> ev) const; bool SendWithContinuousExecution(TAutoPtr<IEventHandle> ev) const; bool SendWithContinuousExecution(const TActorId& recipient, IEventBase* ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const; - template <typename TEvent> - bool SendWithContinuousExecution(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const { - return SendWithContinuousExecution(recipient, static_cast<IEventBase*>(ev.Release()), flags, cookie, std::move(traceId)); + bool SendWithContinuousExecution(const TActorId& recipient, THolder<IEventBase> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const { + return SendWithContinuousExecution(recipient, ev.Release(), flags, cookie, std::move(traceId)); } TInstant Now() const; @@ -467,9 +465,8 @@ namespace NActors { protected: void Describe(IOutputStream&) const noexcept override; bool Send(const TActorId& recipient, IEventBase* ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const noexcept final; - template <typename TEvent> - bool Send(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const{ - return Send(recipient, static_cast<IEventBase*>(ev.Release()), flags, cookie, std::move(traceId)); + bool Send(const TActorId& recipient, THolder<IEventBase> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const{ + return Send(recipient, ev.Release(), flags, cookie, std::move(traceId)); } template <class TEvent, class ... TEventArgs> @@ -478,9 +475,8 @@ namespace NActors { } bool SendWithContinuousExecution(const TActorId& recipient, IEventBase* ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const noexcept final; - template <typename TEvent> - bool SendWithContinuousExecution(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const{ - return SendWithContinuousExecution(recipient, static_cast<IEventBase*>(ev.Release()), flags, cookie, std::move(traceId)); + bool SendWithContinuousExecution(const TActorId& recipient, THolder<IEventBase> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const{ + return SendWithContinuousExecution(recipient, ev.Release(), flags, cookie, std::move(traceId)); } template <class TEvent, class ... TEventArgs> diff --git a/library/cpp/actors/core/actor_coroutine.h b/library/cpp/actors/core/actor_coroutine.h index 9aac243303..6f04f70ef8 100644 --- a/library/cpp/actors/core/actor_coroutine.h +++ b/library/cpp/actors/core/actor_coroutine.h @@ -111,8 +111,7 @@ namespace NActors { return GetActorContext().Send(recipient, ev, flags, cookie, std::move(traceId)); } - template <typename TEvent> - bool Send(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) { + bool Send(const TActorId& recipient, THolder<IEventBase> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) { return GetActorContext().Send(recipient, ev.Release(), flags, cookie, std::move(traceId)); } |