Remove string copy in NetQuery::debug.

GitOrigin-RevId: d559507fe2c52a865a3402d755644650d4833637
This commit is contained in:
levlam 2020-08-03 23:20:26 +03:00
parent e5fa1c3c7f
commit fbca30b2b4

View File

@ -239,14 +239,14 @@ class NetQuery : public TsListNode<NetQueryDebug> {
void debug(string state, bool may_be_lost = false) {
may_be_lost_ = may_be_lost;
VLOG(net_query) << *this << " " << tag("state", state);
{
auto guard = lock();
auto &data = get_data_unsafe();
data.state_ = state;
data.state_ = std::move(state);
data.state_timestamp_ = Time::now();
data.state_change_count_++;
}
VLOG(net_query) << *this << " " << tag("state", state);
}
void set_callback(ActorShared<NetQueryCallback> callback) {