Improve Actor::init name.

This commit is contained in:
levlam 2023-03-27 17:56:40 +03:00
parent f4daa4b61a
commit f2a406690e
3 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class Actor : public ObserverBase {
string set_tag(string tag);
// for ActorInfo mostly
void init(ObjectPool<ActorInfo>::OwnerPtr &&info);
void set_info(ObjectPool<ActorInfo>::OwnerPtr &&info);
ActorInfo *get_info();
const ActorInfo *get_info() const;
ObjectPool<ActorInfo>::OwnerPtr clear();

View File

@ -110,7 +110,7 @@ inline string Actor::set_tag(string tag) {
return old_tag;
}
inline void Actor::init(ObjectPool<ActorInfo>::OwnerPtr &&info) {
inline void Actor::set_info(ObjectPool<ActorInfo>::OwnerPtr &&info) {
info_ = std::move(info);
}

View File

@ -45,7 +45,7 @@ inline void ActorInfo::init(int32 sched_id, Slice name, ObjectPool<ActorInfo>::O
name_.assign(name.data(), name.size());
#endif
actor_->init(std::move(this_ptr));
actor_->set_info(std::move(this_ptr));
deleter_ = deleter;
need_context_ = need_context;
need_start_up_ = need_start_up;