Unify begin/end usages.
GitOrigin-RevId: 422dd5dbfdab7240818bbc35a7c554effa097378
This commit is contained in:
parent
b1adbcba05
commit
983119ada3
@ -327,7 +327,7 @@ void SecretChatActor::send_message_impl(tl_object_ptr<secret_api::DecryptedMessa
|
||||
LOG(INFO) << "Send message: " << to_string(*message) << to_string(file);
|
||||
|
||||
auto it = random_id_to_outbound_message_state_token_.find(random_id);
|
||||
if (it != end(random_id_to_outbound_message_state_token_)) {
|
||||
if (it != random_id_to_outbound_message_state_token_.end()) {
|
||||
return on_outbound_outer_send_message_promise(it->second, std::move(promise));
|
||||
}
|
||||
|
||||
@ -1126,8 +1126,8 @@ void SecretChatActor::do_outbound_message_impl(unique_ptr<logevent::OutboundSecr
|
||||
}
|
||||
|
||||
void SecretChatActor::on_his_in_seq_no_updated() {
|
||||
auto it = begin(out_seq_no_to_outbound_message_state_token_);
|
||||
while (it != end(out_seq_no_to_outbound_message_state_token_) && it->first < seq_no_state_.his_in_seq_no) {
|
||||
auto it = out_seq_no_to_outbound_message_state_token_.begin();
|
||||
while (it != out_seq_no_to_outbound_message_state_token_.end() && it->first < seq_no_state_.his_in_seq_no) {
|
||||
auto token = it->second;
|
||||
it = out_seq_no_to_outbound_message_state_token_.erase(it);
|
||||
on_outbound_ack(token);
|
||||
|
@ -302,8 +302,8 @@ void Scheduler::register_migrated_actor(ActorInfo *actor_info) {
|
||||
}
|
||||
auto it = pending_events_.find(actor_info);
|
||||
if (it != pending_events_.end()) {
|
||||
actor_info->mailbox_.insert(actor_info->mailbox_.end(), make_move_iterator(begin(it->second)),
|
||||
make_move_iterator(end(it->second)));
|
||||
actor_info->mailbox_.insert(actor_info->mailbox_.end(), std::make_move_iterator(it->second.begin()),
|
||||
std::make_move_iterator(it->second.end()));
|
||||
pending_events_.erase(it);
|
||||
}
|
||||
if (actor_info->mailbox_.empty()) {
|
||||
|
@ -165,10 +165,10 @@ void Scheduler::flush_mailbox(ActorInfo *actor_info, const RunFuncT &run_func, c
|
||||
if (guard.can_run()) {
|
||||
(*run_func)(actor_info);
|
||||
} else {
|
||||
mailbox.insert(begin(mailbox) + i, (*event_func)());
|
||||
mailbox.insert(mailbox.begin() + i, (*event_func)());
|
||||
}
|
||||
}
|
||||
mailbox.erase(begin(mailbox), begin(mailbox) + i);
|
||||
mailbox.erase(mailbox.begin(), mailbox.begin() + i);
|
||||
}
|
||||
|
||||
inline void Scheduler::send_to_scheduler(int32 sched_id, const ActorId<> &actor_id, Event &&event) {
|
||||
|
Loading…
Reference in New Issue
Block a user